use better way to get stacktrace