fix a bug which will merge log files