fixed TypeError issue with file caching
fixed TypeError issue with file caching
cleaner handling of exception classes