     }
     
     func downloadQueue(queue: CKDownloadQueue, changedWithRemoval download: SSDownload!) {
+        print("")
         print("Finished: " + download.metadata.title)
+        exit(EXIT_SUCCESS)
     }
 }
 

registry.register(ListUpdatesCommand())
registry.register(helpCommand)

registry.main(defaultVerb: helpCommand.verb, errorHandler: { error in
    fputs(error.description + "\n", stderr)
})

    func downloadQueue(queue: CKDownloadQueue, statusChangedForDownload download: SSDownload!) {
        if let activePhase = download.status.activePhase {
            let percentage = String(Int(floor(download.status.percentComplete * 100))) + "%"
//            let phase = String(activePhase.phaseType)
            print("\u{001B}[2K\r" + percentage + " " + download.metadata.title, appendNewline: false)
        }
    }
    
