         try folder.file(named: "Package.swift").delete()
         try sourcesFolder.file(named: "main.swift").delete()
 
-        let tempFolder = try FileSystem().createFolder(at: "temp")
+        let tempFolder = try folder.createSubfolder(named: "temp")
         print("Cloning PackageBulder by HTTPS to get files in Templates...")
         let packageBuilderGithubURL = "https://github.com/pixyzehn/PackageBuilder.git"
-        try shellOut(to: "git clone \(packageBuilderGithubURL) temp -q")
+        try shellOut(to: "git clone \(packageBuilderGithubURL) \(folder.path)temp -q")
 
         print("Renaming {PROJECT_NAME} to \(projectName)...")
-        try replaceAllFilesOfContentInFolder(oldName: "{PROJECT_NAME}", newName: "\(projectName)", at: "temp/Templates")
+        try replaceAllFilesOfContentInFolder(oldName: "{PROJECT_NAME}", newName: "\(projectName)", at: "\(folder.path)temp/Templates")
 
         let userName = try shellOut(to: "git config user.name")
         print("Renaming {YOUR_NAME} to \(userName)...")
-        try replaceAllFilesOfContentInFolder(oldName: "{YOUR_NAME}", newName: "\(userName)", at: "temp/Templates")
+        try replaceAllFilesOfContentInFolder(oldName: "{YOUR_NAME}", newName: "\(userName)", at: "\(folder.path)temp/Templates")
 
         let thisYear = try shellOut(to: "date \"+%Y\"")
         print("Renaming {THIS_YEAR} to \(thisYear)...")
-        try replaceAllFilesOfContentInFolder(oldName: "{THIS_YEAR}", newName: "\(thisYear)", at: "temp/Templates")
+        try replaceAllFilesOfContentInFolder(oldName: "{THIS_YEAR}", newName: "\(thisYear)", at: "\(folder.path)temp/Templates")
 
         print("Moving files in Templates to a correct position...")
         try tempFolder.subfolder(named: "Templates").file(named: "Package.swift").move(to: folder)

    }

    public func run() throws {
        guard arguments.count == 2 else {
            printDescription()
            print("Examples:")
            print("$ packagebuilder {PROJECT_NAME}")
            return
        }

        let projectName = arguments[1]

        let folder = try FileSystem().createFolder(at: projectName)
        print("Executing `swift package init --type executable`...")
        try shellOut(to: "swift package init --type executable", at: folder.path)


        print("        └── {PROJECT_NAME}Tests.swift")
        print("--------------")
        print("Based on https://www.swiftbysundell.com/posts/building-a-command-line-tool-using-the-swift-package-manager")
        print("Examples:")
        print("$ packagebuilder {PROJECT_NAME}")
    }

    private func replaceAllFilesOfContentInFolder(oldName: String, newName: String, at folderPath: String) throws {
