     println("Usage: Must set fan number (-n) AND fan speed (-s)")
 }
 
+if let key = CLICheckKey.value { checkKey(key) }
 
 if CLITemperatureFlag.value { printTemperatureInformation() }
 if CLIFanFlag.value         { printFanInformation()         }


if CLIDisplayKeysFlag.value { displaySMCKeys = true  }
else                        { displaySMCKeys = false }

//------------------------------------------------------------------------------
// MARK: FUNCTIONS

let CLIVersionFlag     = BoolOption(shortFlag: "v", longFlag: "version",
                                   helpMessage: "Show smckit version and exit.")

let CLIOptions = [CLITemperatureFlag, CLIFanFlag, CLIPowerFlag,
                                                  CLIMiscFlag,
                                                  CLICheckKey,
                                                  CLIDisplayKeysFlag,
                                                  CLIFanNumberFlag,
                                                  CLIFanSpeedFlag,
                                                  CLIHelpFlag,
                                                  CLIVersionFlag]

let CLI = CommandLine()
CLI.addOptions(CLIOptions)

let (success, error) = CLI.parse()
if !success {
    println(error!)
