Bug 2021. Closing an output stream is now separated from finishing the
output content.