Saving stream to output file to be used later as simulated data