We should ensure the stream is closed.