Add some debugging for outputting a stream.