 }
 
 extension NSUserDefaults {
+  
+  static func initiliaze() {
+    guard !initialized else { return }
+    let defaults = [DefaultsKey.initialized: true]
+    standardUserDefaults().registerDefaults(defaults)
+    standardUserDefaults().synchronize()
+  }
+  
+  private static func _setObj(obj: AnyObject?, forKey key: String) {
+    standardUserDefaults().setObject(obj, forKey: key)
+    standardUserDefaults().synchronize()
+  }
+  
   static var initialized: Bool {
     get {
-      return self.standardUserDefaults().boolForKey(DefaultsKey.initialized)
+      return standardUserDefaults().boolForKey(DefaultsKey.initialized)
     }
     set {
-      standardUserDefaults().setBool(newValue, forKey: DefaultsKey.initialized)
-      standardUserDefaults().synchronize()
+      _setObj(newValue, forKey: DefaultsKey.initialized)
     }
   }
   

    printUsage()
    exit(EXIT_FAILURE)
  }
  password
}

if NSUserDefaults.initialized == false {
  NSUserDefaults.initialized = true
}

if Process.arguments.contains(Options.setPassword) {
  setPassword(Process.arguments.last)

  runScript()
}

exit(EXIT_SUCCESS)