 
   fs.writeFile outputFile, $.html(), (err) ->
     if err
-      console.log '\x1b[31m' + 'cannot write to `' + outputFile + '`\x1b[0m'
+      logErr "cannot write to `#{ outputFile }`"
       process.exit 1
 
-    console.log '\x1b[32m' + 'output to `' + outputFile + '`\x1b[0m'
+    log "output to `#{ outputFile }`"
 
 
 init()

        path = $el.attr 'href'
        fs.readFile path, (err, data) ->
          if err
            console.log '\x1b[31m' + 'cannot read `' + path + '`\x1b[0m'
            process.exit 1

          $el.after("<style>#{ cleanCss.process data.toString() }</style>").remove()


  fs.readFile fileName, (err, data) ->
    if err
      logErr "cannot read `#{ filePath }`"
      process.exit 1

    $ = cheerio.load data
    targets = $ '.monocat'
    len = targets.length
    if len is 0
      logErr 'found no elements with `monocat` class... exiting.'
      process.exit 1

    log 'gathering assets...'

    targets.each (i, el) ->
      $el = $ el
