fixed error with readfilesync