log error stack traces when they are available