Adding debugging function that does stack trace.