Updated threaded file stream