`NameError` is used if a variable cannot be found. If a file cannot be found, raise `IOError`. If neither of them fit, try to find a better suiting one or create your own custom exception.