Reworking of backtrace to use pragma directive