Pull out redundant setting check code
Add defaults for max_errors and batch-size