Fixed file check

oh dear