@Override public void write(final File filename) throws DITAOTException { // pass map's directory path filePath = filename; try { output = new StringWriter(); processChunk(rootTopicref, null); if (!copyto.isEmpty()) { updateList(); } } finally { if (output != null) { try { output.close(); } catch (final IOException e) { logger.error(e.getMessage(), e); } } } }