capture the stack trace