public void saveScheme() {
        final String schemeFilePath = dlgDiscreteModel.open();
        if (schemeFilePath != null) {
            Yaml yaml = new Yaml();
            BufferedWriter stream = null;
            try {
                stream = new BufferedWriter(new FileWriter(schemeFilePath));
                stream.write(yaml.dump(scheme));
                stream.close();
            } catch (FileNotFoundException ex) {
                showMessage(Messages.ERROR_FILE_NOT_FOUND + schemeFilePath, "Error");
            } catch (IOException ex) {
                showMessage(Messages.ERROR_CANT_WRITE_TO_FILE + schemeFilePath, "Error");
            }
            String message = Messages.FILE_SAVED + schemeFilePath;
            status(message);
        } else {
            status(Messages.LIBRARY_FILE_NOT_SELECTED);
        }
    }