Added in a method to print a stack trace.