add the support for testing the random failure

taskChan is mainly used to sync between producer and consumers on the task, so if task dies, it put a true flag in the taskChan so that controller can use that signal to start a replacement.