pub fn write_tokens(tokens: &BTreeMap<String, String>) -> Result<(), ()>