Add task checking before computation.