fix log file bug