 
   # Private: Rereads the contents of the file, and stores them in the cache.
   updateCachedDiskContentsAsync: ->
-    Q(@file.read() ? "").then (contents) ->
+    Q(@file?.read() ? "").then (contents) =>
       @cachedDiskContents = contents
 
   # Gets the file's basename--that is, the file without any directory information.

    @text.clearUndoStack()

  loadAsync: ->
    @updateCachedDiskContentsAsync().then ->
      @reload() if @loadFromDisk and @isModified()
      @text.clearUndoStack()
      Q(this)

          @reload()

    @file.on "removed", =>
      @updateCachedDiskContentsAsync().done =>
        @triggerModifiedStatusChanged(@isModified())

    @file.on "moved", =>
