changed the way files from streams are created