fix bug on first log file