         }
     }
     
+    private func validate(files:[String]) -> Void
+    {
+        for file in files {
+            Utils.debug("Validating \(file)")
+            let data = Utils.fromJSONFile(file)
+            if (data != nil) {
+                for (key, value) in data! {
+                    var testFile = false
+                    var testArray = false
+                    if (key == keyCopied) {
+                        testArray = true
+                    }
+                    else if (key == keyAppIcon) {
+                        testFile = true
+                    }
+                    else if (key == keyAndroidAppIcon) {
+                        testFile = true
+                    }
+                    else if (key == keyIOSAppIcon) {
+                        testFile = true
+                    }
+                    else if (key == keyFonts) {
+                        testArray = true
+                    }
+                    else if (key == keyImages) {
+                        testArray = true
+                    }
+                    else if (key == keyImagesScaled) {
+                        testArray = true
+                    }
+                    else if (key == keyImagesScaledIos) {
+                        testArray = true
+                    }
+                    else if (key == keyImagesScaledAndroid) {
+                        testArray = true
+                    }
+                    else if (key == keyImagesIos) {
+                        testArray = true
+                    }
+                    else if (key == keyImagesAndroid) {
+                        testArray = true
+                    }
+                    else if (key == keyAndroidLayout) {
+                        testArray = true
+                    }
+                    
+                    if (testFile) {
+                        let filePath = sourceAssetFolder! + "/" + (value as! String)
+                        if (NSFileManager.defaultManager().fileExistsAtPath(filePath) == false) {
+                            print("Error: missing file \(filePath)")
+                            exit(-1)
+                        }
+                        else {
+                            Utils.debug("Found \(filePath)")
+                        }
+                    }
+                    if (testArray) {
+                        let list = value as! [String]
+                        for file in list {
+                            let filePath = sourceAssetFolder! + "/" + file
+                            if (NSFileManager.defaultManager().fileExistsAtPath(filePath) == false) {
+                                print("Error: missing file \(filePath)")
+                                exit(-1)
+                            }
+                            else {
+                                Utils.debug("Found \(filePath)")
+                            }
+                        }
+                    }
+                }
+            }
+            else {
+                exit(-1)
+            }
+        }
+    }
+    
     private func consume(data: Dictionary <String, AnyObject>, type: LangType, langOutputFile: String) -> Void
     {
         createFolderForFile(langOutputFile)

        else {
            return image.saveTo(file)
        }
    }
    
    private func writeImageStringArray(stringArray: Dictionary<String, AnyObject>, type: LangType) -> String {

    private func createConfigTemplate(file: String) -> Void {
        let jsonString = Utils.toJSON(baseConfigTemplate)
        if (jsonString != nil) {
            if (saveString(jsonString!, file: file)) {
                Utils.debug("JSON template created at \"\(file)\"")
            }
        }
    }
