In DEBUG mode, display stack trace in errors