save the backtrace in case of exception