Fixed file checking.