fix bug about generate_log.py