private void save() throws IOException {
        JFileChooser fileChooser = new JFileChooser();
        fileChooser.setCurrentDirectory(super.defaultDirectoryForSaveAs);
        ExtensionFileFilter filter = new ExtensionFileFilter("BED Binary Files", ".bed");
        fileChooser.addChoosableFileFilter(filter);

        int option = fileChooser.showSaveDialog(this);
        if (option == JFileChooser.APPROVE_OPTION) {
            String filename = fileChooser.getSelectedFile().getPath();
            if (isEnforceFileExtensions()) {
                if (!filename.endsWith(".bed")) {
                    filename = filename + ".bed";
                }
            }
            try {
                BEDFileWriter bfw = new BEDFileWriter(new File(filename));
            }
            catch (IOException ex) {
                throw new IOException("Could not write file.");
            }
        }
    }