Just checked the sources, `PrintWriter` closes the wrapped writer, 'StringWriter.close()' does nothing. I guess I just remove the `sw.close()` then. Did not understand your "move to separate try" though.