code: protected void writeFile(String subdir, String filename, String content) throws IOException {
          Path dir = root;
          if (subdir != null) {
              dir = dir.resolve(subdir);
  
              // If the dir does not exist, we need to create it
              if (Files.notExists(dir)) {
                  Files.createDirectory(dir);
              }
          }
          Files.write(dir.resolve(filename), content.getBytes(StandardCharsets.UTF_8));
      }
docs: Write a file in ~/.fscrawler/{subdir} dir
  @param subdir subdir where we can read the file (null if we read in the root dir)
  @param filename filename
  @param content The String UTF-8 content to write
  @throws IOException in case of error while reading