def validate_record(errors_count, row_hash, index)
      record = new(row_hash)
      unless record.valid?
        errors_count += 1
        [nil, errors_count, log_and_return_validation_error(record, row_hash, index)]
      else
        [record, errors_count, nil]
      end
    end
def validate_record(errors_count, row_hash, index)
      record = new(row_hash)
      unless record.valid?
        errors_count += 1
        [nil, errors_count, log_and_return_validation_error(record, row_hash, index)]
      else
        [record, errors_count, nil]
      end
    end
Validates each record and returns error count if record is invalid