         }
     }
     
-    private func consume(data: Dictionary <String, AnyObject>, type: LangType, outputFile: String) -> Void
+    private func consume(data: Dictionary <String, AnyObject>, type: LangType, langOutputFile: String) -> Void
     {
+        createFolderForFile(langOutputFile)
+
         // process first pass keys
         for (key, value) in data {
             if (key == keySchemaVersion) {

            exit(-1)
        }

        var result:[String:AnyObject]? = nil
        if (inputFiles == nil) {
            inputFiles = getOptions(args, option: "-inputs")
        }
        if (inputFiles != nil) {
            for file in inputFiles! {
                let d = fromJSONFile(file)
                if (d != nil) {
                    if (result == nil) {
                        result = d
                    }
                    else {
                        result = result! + d!
                    }
                }
            }
        }


            inputFile = getOption(args, option: "-input")
        }
        if (inputFile != nil) {
            result = fromJSONFile(inputFile!) ?? [:]
        }
        
        if (result.isEmpty == false) {
            consume(result, type: compileType, langOutputFile: outputClassFile!)
        }
        else {
            print("Error: missing input file")
