improved watch tool which does not save cache while an error occurs