Added message logging.