     private func editScript(at url: URL) throws {
         
         guard NSWorkspace.shared.open(url) else {
-            // display alert if cannot open/select the script file
             throw ScriptFileError(kind: .open, url: url)
         }
     }

        
        super.init()
        
        // observe for script folder change
        NSFileCoordinator.addFilePresenter(self)
    }
    

    
    
    /// read files and create/add menu items
    private func addChildFileItem(in directoryURL: URL, to menu: NSMenu) {
        
        guard let urls = try? FileManager.default.contentsOfDirectory(at: directoryURL,
                                                                      includingPropertiesForKeys: [.fileResourceTypeKey],
