Generalized FileNotFoundError to IOError for cross platform compatability