Adding runOnFailure to tasks