             fileMenuItem = _win.nativeWindow.menu.addSubmenu(new NativeMenu(), "File");
         }
 
-        function open (file :File) :void {
-            _confFile = file;
-            saveConfFilePath();
-            openConf();
-            updateFromConf();
-            updateWindowTitle(false);
-        };
-
         // Add save and save as by index to work with the existing items on Mac
         // Mac menus have an existing "Close" item, so everything we add should go ahead of that
         var newMenuItem :NativeMenuItem = fileMenuItem.submenu.addItemAt(new NativeMenuItem("New Project"), 0);

            for each (var file :File in files) {
                if (Files.hasExtension(file, "xfl")) {
                    if (ignoreXflAtBase) {
                        _errors.dataProvider.addItem(new ParseError(base.nativePath,
                            ParseError.CRIT, "The import directory can't be an XFL directory, did you mean " +
                            base.parent.nativePath + "?"));
                    } else addFlashDocument(file);

            else saveConf();
        });

        const saveAsMenuItem :NativeMenuItem =
            fileMenuItem.submenu.addItemAt(new NativeMenuItem("Save Project As..."), 4);
        saveAsMenuItem.keyEquivalent = "S";
        saveAsMenuItem.addEventListener(Event.SELECT, saveAs);
    }

    protected function updateWindowTitle (modified :Boolean) :void {
        var name :String = (_confFile != null) ? _confFile.name.replace(/\.flump$/i, "") : "Untitled Project";
        if (modified) name += "*";
        _win.title = name;
    }

    protected function openConf () :void {
        try {
            _conf = FlumpConf.fromJSON(JSONFormat.readJSON(_confFile));
            var dir :String = _confFile.parent.resolvePath(_conf.importDir).nativePath;
            setImport(new File(dir));
        } catch (e :Error) {
            log.warning("Unable to parse conf", e);
            _errorsGrid.dataProvider.addItem(new ParseError(_confFile.nativePath,
                ParseError.CRIT, "Unable to read configuration"));
            _confFile = null;
        }
    }

    protected function open (file :File) :void {
        _confFile = file;
        saveConfFilePath();
        openConf();
        updateFromConf();
        updateWindowTitle(false);
    }

    protected function reloadNow () :void {
        setImport(_importChooser.dir);
        updatePreviewAndExport();
    }

    protected function updateFromConf (..._) :void {
        if (_confFile != null) {
            _importChooser.dir = (_conf.importDir != null) ? _confFile.parent.resolvePath(_conf.importDir) : null;
            _exportChooser.dir = (_conf.exportDir != null) ? _confFile.parent.resolvePath(_conf.exportDir) : null;
        } else {
            _importChooser.dir = null;
            _exportChooser.dir = null;
        }

        var formatNames :Array = [];
        for each (var export :ExportConf in _conf.exports) formatNames.push(export.description);
        _win.formatOverview.text = formatNames.join(", ");

        updateWindowTitle(true);
    }

    protected function updatePreviewAndExport (..._) :void {
        _win.export.enabled = _exportChooser.dir != null && _librariesGrid.selectionLength > 0 &&
            _librariesGrid.selectedItems.some(function (status :DocStatus, ..._) :Boolean {
                return status.isValid;
            });

        var status :DocStatus = _librariesGrid.selectedItem as DocStatus;
        _win.preview.enabled = status != null && status.isValid;

        if (_exportChooser.dir == null) return;
        _conf.exportDir = _confFile == null ? _exportChooser.dir.nativePath : _confFile.parent.getRelativePath(_exportChooser.dir, /*useDotDot=*/true);
    }

    protected function get publisher () :Publisher {
