       if file?.id
         metadata.overwritable = file.editable
         metadata.providerData = id: file.id
-        gapi.drive.realtime.load file.id, fileLoaded, init
+        gapi.drive.realtime.load file.id, fileLoaded, init, error
       else
         callback 'Unable to load file'
 

      gapi.auth.authorize args, (authToken) =>
        @authToken = if authToken and not authToken.error then authToken else null
        @user = null
        if @authToken
          gapi.client.oauth2.userinfo.get().execute (user) =>
            @user = user
        @authCallback @authToken isnt null

  renderAuthorizationDialog: ->
    (GoogleDriveAuthorizationDialog {provider: @})

      content = model.createString ''
      model.getRoot().set 'content', content

    error = (err) =>
      if err.type is 'TOKEN_REFRESH_REQUIRED'
        @authorize GoogleDriveProvider.IMMEDIATE
      else
        alert err.message

    if metadata.providerData?.id
      request = gapi.client.drive.files.get
        fileId: metadata.providerData.id
