Invalid file checking worknig