solve a bug - time record error in log.txt