polishing some command log code