added check whether task deletion was successfull