 
   fs.readFile fileName, (err, data) ->
     if err
-      console.log '\x1b[31m' + 'cannot read `' + filePath + '`\x1b[0m'
+      logErr "cannot read `#{ filePath }`"
       process.exit 1
 
     $ = cheerio.load data
     targets = $ '.monocat'
     len = targets.length
     if len is 0
-      console.log '\x1b[31m' + 'found no elements with `monocat` class... exiting.' + '\x1b[0m'
+      logErr 'found no elements with `monocat` class... exiting.'
       process.exit 1
 
-    console.log '\x1b[33m' + 'gathering assets...' + '\x1b[0m'
+    log 'gathering assets...'
 
     targets.each (i, el) ->
       $el = $ el

initialDir = process.cwd()
$ = fileName = null
len = completed = 0


init = ->
  if args.length <= 2
    console.log '\x1b[31m' + 'please pass an html file' + '\x1b[0m'
    process.exit 1

  filePath = args[2]


  fs.writeFile outputFile, $.html(), (err) ->
    if err
      logErr "cannot write to `#{ outputFile }`"
      process.exit 1

    log "output to `#{ outputFile }`"


init()
