Check to see if task is complete before ending.