move file read into threads