- Fixed file reading bug

It was trying to read a file being written by an async function. Added
callback