Improve exception debugging by logging backtrace