added some error reporting to make finding error-throwing rules faster