     }
     
     func copyAPIKeyClick(sender: AnyObject?) {
-        NSLog("copyAPIKeyClick")
+        os_log("copyAPIKeyClick", log: log, type: .debug)
         let pasteboard = NSPasteboard.general()
         pasteboard.declareTypes([NSPasteboardTypeString], owner: nil)
         pasteboard.setString(createOrRetrieveCoreWalletPassword(), forType: NSPasteboardTypeString)
     }
     
     func devModeClick(sender: AnyObject?) {
-        NSLog("devModeClick")
+        os_log("devModeClick", log: log, type: .debug)
         isDevModeEnabled = !isDevModeEnabled
     }
     
     func exitClick(sender: AnyObject?) {
-        NSLog("exitClick")
+        os_log("exitClick", log: log, type: .debug)
         
         let alert = NSAlert()
         


        self.portalProxyProcess.arguments = [String(self.productionModePortalPort), self.portalRunPath()]
            
        NSLog("Starting Blockstack Portal proxy...")
            
        self.portalProxyProcess.launch()
        complete()

    func blockstackDataURL() -> URL {
        let applicationSupportDirectory = FileManager.default.urls(for: .applicationSupportDirectory, in: .userDomainMask).first!
        
        os_log("Application Support directory: %{public}@", log: log, type: .debug, applicationSupportDirectory.absoluteString)
        
        let blockstackDataPath = applicationSupportDirectory.appendingPathComponent("Blockstack")
        
        os_log("Blockstack data directory: %{public}@", log: log, type: .debug, blockstackDataPath.absoluteString)
        
        do {
            try FileManager.default.createDirectory(atPath: blockstackDataPath.path, withIntermediateDirectories: false, attributes: nil)
        } catch {
            os_log("Blockstack data directory probably already exists", log: log, type: .debug)
        }
        
        return blockstackDataPath
