I suggest using a nice error message than just the CacheException#toString output. At the very least CacheException#getMessage, but better to generate a string like "File not found: <pnfsid>" (you can do that in the loop above, saving you from storing the rather large exception objects).