Refactoring TaskPasser
Added protection against TASK_FAIL messages