add failOnFirstError option