Make sure to close the output stream.