Better API for printing backtrace