task factory throws an exception when task was not found