Replace readfilesync with readfile