Improve exception message tracking