             let outq = DispatchQueue(label: "com.github.rhx.gir2swift.outputqueue")
             if outputDirectory == nil { print(modulePrefix + preamble) }
 
-            func write(_ string: String, to fileName: String, preamble: String = gir.preamble) {
+            func write(_ string: String, to fileName: String, preamble: String = preamble, append doAppend: Bool = false) {
                 do {
-                    if useAlphaNames && fileManager.fileExists(atPath: fileName) {
+                    if doAppend && fileManager.fileExists(atPath: fileName) {
                         let oldContent = try String(contentsOfFile: fileName, encoding: .utf8)
                         let newContent = oldContent + string
                         try newContent.write(toFile: fileName, atomically: true, encoding: .utf8)

                            }
                            f = "\(dir)/\(node)-\(firstName)\(name).swift"
                        }
                        writebg(queue: alphaq, output, to: f)
                        output = ""
                        first = nil
                    }
                    if first != nil {
                        let f = "\(dir)/\(node)-\(firstName)\(useAlphaNames ? "" : name).swift"
                        writebg(queue: alphaq, output, to: f)
                    }
                } else {
                    let code = types.map { type in

                        return convert(type)
                    }.joined(separator: "\n\n")
                    outq.async(group: queues) { print(code) }
                }
            }

            if let dir = outputDirectory {
                let atChar = Character("@").utf8.first!
                DispatchQueue.concurrentPerform(iterations: 27) { i in
                    let ascii = atChar + UInt8(i)
                    let f = "\(dir)/\(node)-\(Character(UnicodeScalar(ascii))).swift"
                    try? fileManager.removeItem(atPath: f)
                    if alphaNames {
                        try? preamble.write(toFile: f, atomically: true, encoding: .utf8)
                    }
                }
            }

