Dont write cache if task fails