Add transaction stats in the exception routine