Add error checking to job cache cleanup

This is just debugging info to help us track down why cleanup is not always working, as in #12396.