fix file check.