Use flag in task