code: static void writePatch(final Patch rollbackPatch, final File file) throws IOException {
          final File parent = file.getParentFile();
          if (!parent.isDirectory()) {
              if (!parent.mkdirs() && !parent.exists()) {
                  throw PatchLogger.ROOT_LOGGER.cannotCreateDirectory(file.getAbsolutePath());
              }
          }
          try {
              try (final OutputStream os = new FileOutputStream(file)){
                  PatchXml.marshal(os, rollbackPatch);
              }
          } catch (XMLStreamException e) {
              throw new IOException(e);
          }
      }
docs: Write the patch.xml
  
  @param rollbackPatch the patch
  @param file          the target file
  @throws IOException