Close the stream