Changed the File I/O calls to be single threaded again.