fix log_file bug