 }
 
 /**
-Print error message to STDERR
-
-:param: error message to print
+Print message to STDERR and exit(1)
+
+:param: message message to print
 */
 func error(message: String) {
+    printSTDERR(message)
+    exit(1)
+}
+
+/**
+Print message to STDERR. Useful for UI messages without affecting STDOUT data.
+
+:param: message message to print
+*/
+func printSTDERR(message: String) {
     let stderr = NSFileHandle.fileHandleWithStandardError()
-    stderr.writeData(message.dataUsingEncoding(NSUTF8StringEncoding)!)
-    exit(1)
+    stderr.writeData((message + "\n").dataUsingEncoding(NSUTF8StringEncoding)!)
 }
 
 /**

    var responses = XPCArray()

    // Print docs for each Swift file
    for file in swiftFiles {
        xpc_dictionary_set_string(openRequest, "key.sourcefile", file)
        xpc_dictionary_set_string(cursorInfoRequest, "key.sourcefile", file)


import XPC

/// Version number
let version = "0.1.2"

// MARK: Helper Functions

