log full stack trace only when debugging
fixed display error