updated file read check