Added some failOnError and flush flags, upgraded to 222