(note: similar to #763 but for output side; based on FasterXML/jackson-databind#3508)
Looks like there is a code path during initialization of OutputStream for managed streams (for java.io.File) which may result in leaked OutputStreams (and related entities like file handles).
It's necessary to ensure that this does not happen.