added exception handling to cache lookup