Add failOnError option.