add try/catch statement to wrap rules re-index and do a rollback in case of an exception