private static void write(String root, Object x) {
        YamlConfiguration config = load();
        config.set(root, x);
        try {
            config.save(file);
        } catch (IOException e) {
            e.printStackTrace();
        }
    }