fixed error in format_nc_files