fix without close log file bug