add stack trace in debug mode