When there is an internal exception writeDocumentGraph(...) the finally block is triggered and attempts to close the XML stream:
https://github.com/korpling/salt/blob/develop/salt-api/src/main/java/org/corpus_tools/salt/util/internal/persistence/SaltXML10Writer.java#L352
Unfortunately the stream might be already closed due to the previous exception and closing it will trigger a new exception that the stream is already closed. This new exception is reported to the user in the logging and the console output and thus mask the actual original problem.