better error logging of cleanup errors