fixed long log file output bug