ensure-buffered-stream