private void save() {
        if(saveTarget != null) {
            final String saveType = SaveTargets.getSaveTargetType(saveTarget.getClass());
            if (saveType != null) {
                properties.setProperty("save.type", saveType);
            }
        }
        if(idGenerator != null) {
            final String idType = IdGenerators.getIdGeneratorType(idGenerator.getClass());
            if (idType != null) {
                properties.setProperty("idgen.type", idType);
            }
        }
        if(targetUrl != null) {
            properties.setProperty("clipboard", targetUrl);
        }
        try {
            properties.store(new FileWriter(configFile), "Configuration file for YawkatSnap");
        } catch (IOException e) {
            e.printStackTrace();
        }
    }