fn write_index(index: HashMap<String, HashSet<u32>>, path: &Path) -> Result<()>