public void save() {
        OutputStream os = null;

        try {
            os = new FileOutputStream(this.fileName);
        } catch (FileNotFoundException ex) {
            Logger.getLogger(PropertiesFile.class.getName()).log(Level.SEVERE, null, ex);
        }

        PrintStream ps = new PrintStream(os);

        // Keep track of properties that were set
        List<String> usedProps = new ArrayList<String>();

        for (String line : this.lines) {
            if (line.trim().length() == 0) {
                ps.println(line);
                continue;
            }

            if (line.charAt(0) == '#') {
                ps.println(line);
                continue;
            }

            if (line.contains("=")) {
                int delimPosition = line.indexOf('=');
                String key = line.substring(0, delimPosition).trim();

                if (this.props.containsKey(key)) {
                    String value = this.props.get(key);
                    ps.println(key + "=" + value);
                    usedProps.add(key);
                } else {
                    ps.println(line);
                }
            } else {
                ps.println(line);
            }
        }

        // Add any new properties
        for (Map.Entry<String, String> entry : this.props.entrySet()) {
            if (!usedProps.contains(entry.getKey())) {
                ps.println(entry.getKey() + "=" + entry.getValue());
            }
        }

        // Exit that stream
        ps.close();

        // Reload
        try {
            lines.clear();
            this.load();
        } catch (IOException ex) {
            log.severe("[propertiesFile] Unable to load " + fileName + "!");
        }
    }