Clearing all caches in case of error