       if (outputDir = @getOutputDir '.svg')?
         filename.dir = outputDir
       filename = path.format filename
-    console.log '->', filename
-    fs.writeFileSync filename, @renderSVG mappings, styles
-    filename
+    if maybeWrite filename, @renderSVG mappings, styles
+      console.log '->', filename
+      filename
+    else
+      console.log '->', filename, '(unchanged)'
+      null
   renderSVGDOM: (mappings, styles) ->
     ###
     Main rendering engine, returning an xmldom object for the whole document.

    path.format filename2
  writeSVG: (mappings, styles, filename) ->
    for drawing in @drawings
      drawing.writeSVG mappings, styles, @subfilename '.svg', drawing
  writeTeX: (filename) ->
    for drawing in @drawings
      subfilename = @subfilename '.svg_tex', drawing

         outputDir?
        relativeDir = path.relative (outputDir ? '.'), (graphicDir ? '.')
      filename = path.format filename
    if maybeWrite filename, @renderTeX filename, relativeDir
      console.log ' &', filename
      filename
    else
      console.log ' &', filename, '(unchanged)'
      null

class ASCIIDrawing extends Drawing
  @title: "ASCII drawing (one character per symbol)"
