fixes file check