replace stack traces with log.warn() calls