@Override
    public Group createAndLoadGroup(String name) throws IOException {
        Group group = this.plugin.getGroupManager().getOrMake(name);
        try {
            ConfigurationNode file = readFile(StorageLocation.GROUPS, name);

            if (file != null) {
                group.loadNodesFromStorage(readNodes(file));
            } else {
                file = ConfigurationNode.root();
                if (this instanceof SeparatedConfigurateStorage) {
                    file.getNode("name").setValue(group.getName());
                }

                writeNodes(file, group.normalData().asList());
                saveFile(StorageLocation.GROUPS, name, file);
            }
        } catch (Exception e) {
            throw new FileIOException(name, e);
        }
        return group;
    }
Saves a configuration node to the given location

@param location the location
@param name the name of the object
@param node the node
@throws IOException if an io error occurs
common/src/main/java/me/lucko/luckperms/common/storage/implementation/file/AbstractConfigurateStorage.java