code: public static String readJsonFile(Path dir, Path config, String version, String filename) throws IOException {
          try {
              return readJsonVersionedFile(dir, version, filename);
          } catch (NoSuchFileException e) {
              // We fall back to default mappings in config dir
              return readDefaultJsonVersionedFile(config, version, filename);
          }
      }
docs: Reads a Json file from dir/version/filename.json file.
  If not found, read from ~/.fscrawler/_default/version/filename.json
  
  @param dir Directory which might contain filename files per major version (job dir)
  @param config Root dir where we can find the configuration (default to ~/.fscrawler)
  @param version Elasticsearch major version number (only major digit is kept so for 2.3.4 it will be 2)
  @param filename The expected filename (will be expanded to filename.json)
  @return the mapping
  @throws IOException If the mapping can not be read