public void save() throws IOException { 
        if (!unsaved) {
            return;
        } 
        try (BufferedWriter bw = new BufferedWriter(new FileWriter(path))) {
            bw.write("" + VERSION);
            bw.newLine();
            for (String key : entries.keySet()) {
                bw.write(key);
                Entry entry = entries.get(key);
                bw.write(CLASS_OPEN + entry.type.getName() + CLASS_CLOSE);
                bw.write(DELIMITER);
                bw.write(parser.toString(entry.type, key, entry.currentValue));
                bw.newLine();
            }
            unsaved = false;
        } catch (IOException e) {
            throw e;
        }
    }