Correct fix for checking for subclasses of File