fixed the time bug in logging.