     }
     
     private func enumerateDirectory(atPath path: String) {
-        print("\nDIRECTORY: \(path)")
+        print("\n\(Color.Yellow)- DIRECTORY: \(path)")
         
         let enumerator = fileManager.enumerator(atPath: path)
         
         while let element = enumerator?.nextObject() as? String {
             if !shouldSkip(element) {
-                let filePath = path.appending(element)
-                updateContentsOfFile(atPath: filePath)
-                renameItem(atPath: filePath)
+                let itemPath = path.appending(element)
+                
+                var isDir: ObjCBool = false
+                if fileManager.fileExists(atPath: itemPath, isDirectory: &isDir) {
+                    if !isDir.boolValue {
+                        updateContentsOfFile(atPath: itemPath)
+                    }
+                }
+
+                renameItem(atPath: itemPath)
             }
         }
     }


class XcodeProjectRenamer: NSObject {
    
    // MARK: - Properties
    
    let fileManager = FileManager.default

    private func shouldSkip(_ element: String) -> Bool {
        guard !element.contains(".DS_Store") else { return true }
        
        let fileExtension = URL(fileURLWithPath: element).pathExtension
        switch fileExtension {
        case "appiconset", "json", "png", "xcuserstate":
            return true
        default:
            return false
