public boolean save(File file) {
        checkPaths();
        file.getParentFile().mkdirs();
        if (!file.exists()) {
            try {
                file.createNewFile();
            } catch (IOException ex) {
                Debug.p("Deck file could not be created: "
                        + file + ": " + ex, Debug.E);
                return false;
            }
        }
        try (Writer bf = new OutputStreamWriter(
                new FileOutputStream(file), "Unicode")) {
            for (int i = 0; i < names.size(); i++) {
                bf.write(names.get(i) + ";"
                        + amounts.get(i) + ";"
                        + paths.get(i) + System.getProperty("line.separator"));
            }
        } catch (IOException ex) {
            Debug.p("Deck could not be saved to file "
                    + file + ": " + ex, Debug.E);
            return false;
        }
        deckName = Utilities.getName(file);
        return true;
    }