Fix remove task when the task doesn't exist.
emit a debug log if the task could not be deleted.