Improvements about logging.