log stack traces in debug mode