Use IOError, OSError instead of FileNotFoundError