fixed stream_to_disk