     catch error
       if error.code is 'EACCES' and process.platform is 'darwin'
         runas ?= require 'runas'
-        # Use dd to read from stdin and write to filePath, same thing could be
-        # done with tee but it would also copy the file to stdout.
+        # Use dd to read from stdin and write to the file path, same thing could
+        # be done with tee but it would also copy the file to stdout.
         unless runas('/bin/dd', ["of=#{filePath}"], stdin: text, admin: true) is 0
           throw error
       else

    catch error
      if error.code is 'EACCES' and process.platform is 'darwin'
        runas ?= require 'runas'
        # Use sync to force completion of pending disk writes.
        if runas('/bin/sync', [], admin: true) isnt 0
          throw error

    undefined

  safeWriteSync: (text) ->
    try
      fd = fs.openSync(@getPath(), 'w')
      fs.writeSync(fd, text)

      # Ensure file contents are really on disk before proceeding
      fs.fdatasyncSync(fd)
      fs.closeSync(fd)

