Added a max-error-event option for the pipeline