converting file read to streaming