detect broken cache
fix and cleanup