Closing output stream