<commit_before>package eu.inn.config

import java.io.{File, IOException}

import com.typesafe.config.{Config, ConfigFactory}

class ConfigLoader(localConfigPropertyName: String, separator: String, failIfConfigNotFound: Boolean) {
  def load(): Config = {
    System.getProperty(localConfigPropertyName, "")
      .split(separator)
      .filterNot(_.trim.isEmpty)
      .foldLeft(ConfigFactory.load())({ (conf, filePath) ⇒
        val file = new java.io.File(filePath.trim)
        if (!file.exists && failIfConfigNotFound) {
          throw new IOException(s"${file.getAbsolutePath} is not found")
        }
        ConfigFactory.parseFile(file).withFallback(conf)
      })<commit_msg>- exception fixed<commit_after>package eu.inn.config

import java.io.{File, FileNotFoundException}

import com.typesafe.config.{Config, ConfigFactory}

class ConfigLoader(localConfigPropertyName: String, separator: String, failIfConfigNotFound: Boolean) {
  def load(): Config = {
    System.getProperty(localConfigPropertyName, "")
      .split(separator)
      .filterNot(_.trim.isEmpty)
      .foldLeft(ConfigFactory.load())({ (conf, filePath) ⇒
        val file = new java.io.File(filePath.trim)
        if (!file.exists && failIfConfigNotFound) {
          throw new FileNotFoundException(s"${file.getAbsolutePath} is not found")
        }
        ConfigFactory.parseFile(file).withFallback(conf)
      })
{'fraction_non_alphanumeric': 0.12249283667621777, 'fraction_numerical': 0.0, 'mean_word_length': 3.817241379310345, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6431902', 'n_tokens_mistral': 407, 'n_tokens_neox': 405, 'n_words': 80}