Simplify log messages and fix traceback.