 switch CommandLine.argc {
 case 1:
   setup()
-case 2:
-  if arguments[1] == "-getfile" {
-    guard isRootUserWithSudoCommand() else {
-      authorityAlert(needSudo: true)
-      break
-    }
+case 3:
+  let type = arguments[2]
+  
+  guard
+    arguments[1] == "-g",
+    (type == "file" || type == "project")
+  else {
+    argumentsAlert()
+    break
+  }
+
+  guard isRootUserWithSudoCommand() else {
+    authorityAlert(needSudo: true)
+    break
+  }
+  
+  if type == "file" {
     getBaseTemplate(type: .file)
   }
-  else if arguments[1] == "-getproject" {
-    guard isRootUserWithSudoCommand() else {
-      authorityAlert(needSudo: true)
-      break
-    }
+  else if type == "project" {
     getBaseTemplate(type: .project)
   }
-  else {
-    print("Illegal option")
-    print("usage : swift install_template.swift [-getfile / -getproject]")
-  }
 default:
-  print("Illegal option. Only one option available at a time ")
-}
+  argumentsAlert()
+}

  
  while true {
    print("Select Target Path Number : ", terminator: "")
    let input = readLine() ?? "0"
    guard let num = Int(input), num >= 0, num < 4 else {
      print("Wrong Value\n")
      continue
    }
    
    switch num {
    case 0:
      guard !isRootUserWithSudoCommand() else {
        authorityAlert(needSudo: false)
        return
      }
    case 1:
      guard !isRootUserWithSudoCommand() else {
        authorityAlert(needSudo: false)
        return
      }
      directoryPath = userHomeDirectory
      pathEndPoint = PathEndPoint.customProjectTemplate.rawValue
    case 2:
      guard isRootUserWithSudoCommand() else {
        authorityAlert(needSudo: true)
        return
      }
      directoryPath = xcodeBasePath
      pathEndPoint = PathEndPoint.xcodeFileTemplate.rawValue
    case 3:
      guard isRootUserWithSudoCommand() else {
        authorityAlert(needSudo: true)
        return

  // Print Target Directory Path
  print("Select Directory Path to Install Template")
  print(String(repeating: "#", count:40))
  print("1: Custom File Template")
  print("2: Custom Project Template")
  print("3: Xcode File Template (admin only)")
  print("4: Xcode Project Template (admin only)")
  print(String(repeating: "#", count:40), terminator: "\n\n")
  
  
