     
         notificationCenter.addObserver(self, selector: "taskStopped:", name: NSTaskDidTerminateNotification, object: task)
         notificationCenter.addObserver(self, selector: "receivedOut:", name: NSFileHandleDataAvailableNotification, object: nil)
+    }
+    
+    func registerVersion() -> Bool {
+        var pipe : NSPipe = NSPipe()
+        var versionTask = NSTask()
+        versionTask.launchPath = path as String
+        versionTask.arguments = ["--version"]
+        versionTask.standardOutput = pipe
+        versionTask.launch()
+        versionTask.waitUntilExit()
+        
+        let versionOut = pipe.fileHandleForReading.readDataToEndOfFile()
+        let versionString = NSString(data: versionOut, encoding: NSUTF8StringEncoding)
+        
+        var regex = NSRegularExpression(pattern: "^syncthing v(\\d+)\\.(\\d+)\\.(\\d+)",
+            options: nil, error: nil)
+        var results = regex!.matchesInString(versionString! as String, options: nil, range: NSMakeRange(0, versionString!.length))
+        if results.count == 1 {
+            let major = versionString?.substringWithRange(results[0].rangeAtIndex(1)).toInt() as Int!
+            let minor = versionString?.substringWithRange(results[0].rangeAtIndex(2)).toInt() as Int!
+            let patch = versionString?.substringWithRange(results[0].rangeAtIndex(3)).toInt() as Int!
+            
+            version = [ major, minor, patch ]
+            println("Syncthing version \(version![0]) \(version![1]) \(version![2])")
+            return true
+        } else {
+            return false
+        }
     }
     
     func run() -> (String?) {

    var log : SyncthingLog
    var buf : NSString = NSString()
    var apiKey: NSString?

    init(log: SyncthingLog) {
        self.log = log

                    var jsonResult: NSDictionary = NSJSONSerialization.JSONObjectWithData(data, options: NSJSONReadingOptions.MutableContainers, error: nil) as! NSDictionary
                    
                    // mop: WTF am i typing :S
                    let folders = jsonResult[foldersElement] as? Array<AnyObject>
                    if folders != nil {
                        let folderStructArr = folders!.filter({(object: AnyObject) -> (Bool) in
                            let id = object[idElement] as? String
                            let path = object[pathElement] as? String
                            
                            return id != nil && path != nil
                        }).map({(object: AnyObject) -> (SyncthingFolder) in
                            let id = object[idElement] as? String
                            let pathTemp = object[pathElement] as? String
                            let path = pathTemp?.stringByExpandingTildeInPath
                                                        
                            return SyncthingFolder(id: id!, path: path!)
