Add backtrace to error handling