Make class caching error message more helpful