         switch arg
           when '-o', '--output'
             mode = 'output'
+          when '--flat-fold'
+            options.flatFold = true
           else
             filenames.push arg
   for filename in filenames
-    file.fileToFile filename, output
+    file.fileToFile filename, output, options
 
 file.main() if require.main == module

    result = convert.toJSON result
  fs.writeFileSync output, result, 'utf-8'

file.fileToFile = (input, output, converter = null) ->
  inFormat = file.extensionOf input
  outFormat = file.extensionOf output
  unless inFormat

  unless outFormat
    console.warn "Could not detect extension of #{output}"
    return
  converter = options.converter
  unless converter?
    converter = convert.getConverter inFormat, outFormat
    unless converter?
