     }
 
     // check cache
-    if let cacheFile = cacheFile, cacheFilePath.exists {
+    if let cacheFile = cacheFile,
+        projectPath.exists,
+        cacheFilePath.exists {
         do {
             let existingCacheFile: String = try cacheFilePath.read()
             if cacheFile.string == existingCacheFile {

    // load project spec
    do {
        project = try specLoader.loadProject(path: projectSpecPath)
    } catch let error as CustomStringConvertible {
        fatalError("Parsing project spec failed: \(error)")
    } catch {

        // file writing
        logger.info("⚙️  Writing project...")
        let fileWriter = FileWriter(project: project)
        try fileWriter.writeXcodeProject(xcodeProject, to: projectPath)
        try fileWriter.writePlists()

