Fix issue with error checking for pretty backtrace