code: private synchronized void saveFile(String fileContent, File fileName) {
          try {
              if (imports.getSymbols().contains(fileName.getName())) {
                  logInfo("   imported " + fileName);
                  ++imported;
              } else {
                  export.getSymbols().add(fileName.getName());
                  MessageDigest algo = MessageDigest.getInstance("MD5");
                  algo.update(fileContent.getBytes());
                  String md5 = bytesToHexString(algo.digest());
                  newHashes.put(fileName.getName(), md5);
  
                  if (!context.getSettings().isUseHash() || !oldFiles.contains(fileName) || !md5.equals(oldHashes.getProperty(fileName.getName()))) {
                      fileName.setWritable(true);
                      BufferedOutputStream writer = new BufferedOutputStream(new FileOutputStream(fileName));
                      writer.write(fileContent.getBytes());
                      fileName.setWritable(false);
                      writer.close();
                      ++generated;
                      logInfo("   generated " + fileName);
                  } else {
                      ++skipped;
                      logInfo("   skipped " + fileName);
                  }
                  oldFiles.remove(fileName);
              }
          } catch (Exception e) {
              throw new RuntimeException("Failed to save file " + e.getMessage());
          }
      }
docs: Write the file {@code fileName} in the target directory with
  {@code fileContent}. If {@code useHash} is true, then the file is save if
  it's doesn't exist or if the content has changed.