Added debugging for caching