tools/reduce: speedup, terminate checking when error is found