Added back ability to specifiy max task failures