 
 var lookingForIndent = false
 
+func printToError(_ string: String) {
+	guard let data = string.data(using: .utf8) else {
+		return
+	}
+	FileHandle.standardError.write(data)
+}
+
 for var argument in CommandLine.arguments.dropFirst() {
 	if argument.hasPrefix("-") {
 		argument.remove(at: argument.startIndex)


import CoreServices
import Foundation

var indentSize = 0
var indent: String {

		case "i":
			lookingForIndent = true
		default:
			printToError("-\(argument) is not a valid option.\nValid options are -i and -f.")
			exit(invalidOption)
		}
	} else {
		if (lookingForIndent) {
			guard let size = Int(argument) else {
				printToError("\(argument) is not a valid indent size. Exiting.")
				exit(invalidIndent)
			}
			indentSize = size
			lookingForIndent = false
