docs: private void writeToContentChunk(final String tmpContent, final URI outputFileName, final boolean needWriteDitaTag) throws IOException {
          assert outputFileName.isAbsolute();
          logger.info("Writing " + outputFileName);
          try (OutputStreamWriter ditaFileOutput = new OutputStreamWriter(new FileOutputStream(new File(outputFileName)), StandardCharsets.UTF_8)) {
              if (outputFileName.equals(changeTable.get(outputFileName))) {
                  // if the output file is newly generated file
                  // write the xml header and workdir PI into new file
                  writeStartDocument(ditaFileOutput);
                  final URI workDir = outputFileName.resolve(".");
                  if (!OS_NAME.toLowerCase().contains(OS_NAME_WINDOWS)) {
                      writeProcessingInstruction(ditaFileOutput, PI_WORKDIR_TARGET, new File(workDir).getAbsolutePath());
                  } else {
                      writeProcessingInstruction(ditaFileOutput, PI_WORKDIR_TARGET, UNIX_SEPARATOR + new File(workDir).getAbsolutePath());
                  }
                  writeProcessingInstruction(ditaFileOutput, PI_WORKDIR_TARGET_URI, workDir.toString());
  
                  final File path2rootmap = toFile(getRelativePath(outputFileName, job.getInputMap())).getParentFile();
                  writeProcessingInstruction(ditaFileOutput, PI_PATH2ROOTMAP_TARGET_URI, path2rootmap == null ? "./" : toURI(path2rootmap).toString());
  
                  if (conflictTable.get(outputFileName) != null) {
                      final String relativePath = getRelativeUnixPath(new File(currentFile.resolve(".")) + UNIX_SEPARATOR + FILE_NAME_STUB_DITAMAP,
                              new File(conflictTable.get(outputFileName)).getAbsolutePath());
                      String path2project = getRelativeUnixPath(relativePath);
                      if (null == path2project) {
                          path2project = "";
                      }
                      writeProcessingInstruction(ditaFileOutput, PI_PATH2PROJ_TARGET, path2project);
                      writeProcessingInstruction(ditaFileOutput, PI_PATH2PROJ_TARGET_URI, path2project.isEmpty() ? "./" : toURI(path2project).toString());
                  }
              }
              if (needWriteDitaTag) {
                  final AttributesImpl atts = new AttributesImpl();
                  addOrSetAttribute(atts, ATTRIBUTE_NAMESPACE_PREFIX_DITAARCHVERSION, DITA_NAMESPACE);
                  addOrSetAttribute(atts, ATTRIBUTE_PREFIX_DITAARCHVERSION + COLON + ATTRIBUTE_NAME_DITAARCHVERSION, "1.3");
                  writeStartElement(ditaFileOutput, ELEMENT_NAME_DITA, atts);
              }
              // write the final result to the output file
              ditaFileOutput.write(tmpContent);
              if (needWriteDitaTag) {
                  writeEndElement(ditaFileOutput, ELEMENT_NAME_DITA);
              }
              ditaFileOutput.flush();
          } catch (SAXException e) {
              throw new IOException(e);
          }
      }