 			(_ hdl: FileHandle) -> Void in
 			let data = hdl.availableData
 			if let str = String.stringFromData(data: data) {
-				CNExecuteInMainThread(doSync: false, execute: {
+				DispatchQueue.main.async {
 					() -> Void in
 					self.receiveInputStream(string: str)
 					self.scrollToBottom()
-				})
+				}
 			}
 		}
 		mErrorPipe.fileHandleForReading.readabilityHandler = {
 			(_ hdl: FileHandle) -> Void in
 			let data = hdl.availableData
 			if let str = String.stringFromData(data: data) {
-				CNExecuteInMainThread(doSync: false, execute: {
+				DispatchQueue.main.async {
 					self.receiveInputStream(string: str)
 					self.scrollToBottom()
-				})
+				}
 			}
 		}
 	}

	}

	public override func observeValue(forKeyPath keyPath: String?, of object: Any?, change: [NSKeyValueChangeKey : Any]?, context: UnsafeMutableRawPointer?) {
		CNExecuteInMainThread(doSync: false, execute: { [self]
			() -> Void in
			if let key = keyPath, let vals = change {
				if let _ = vals[.newKey] as? Dictionary<CNInterfaceStyle, CNColor> {

					}
				}
			}

		}
	}

	private func updateForegroundColor() {
