added method to print a throwable to the debug logger