 {Emitter, Disposable} = require 'event-kit'
 fs = require 'fs-plus'
 Grim = require 'grim'
-Q = null # Defer until used
+
+Q = null     # Defer until used
 runas = null # Defer until used
-iconv = require 'iconv-lite'
+iconv = null # Defer until used
 
 Directory = null
 PathWatcher = require './main'

      promise = deferred.promise
      content = []
      bytesRead = 0
      readStream = fs.createReadStream(@getPath())
      readStream = readStream.pipe(iconv.decodeStream(@getEncoding()))
      readStream.on 'data', (chunk) ->
        content.push(chunk)
        bytesRead += chunk.length

  # permission to the path.
  writeFileWithPrivilegeEscalationSync: (filePath, text) ->
    try
      @writeFileSync(filePath, text)
    catch error
      if error.code is 'EACCES' and process.platform is 'darwin'
        runas ?= require 'runas'
