 
         @_syncstring.once 'init', (err) =>
             if err
-                window.err = err
                 if err.code == 'EACCES'
                     err = "You do not have permission to read '#{@filename}'."
                 @editor.show_startup_message(err, 'danger')

        @_syncstring.once 'init', =>
            @emit('connect')   # successful connection
            @_syncstring.wait_until_read_only_known (err) =>  # first time open a file, have to look on disk to load it -- this ensures that is done
                opts.cb(err, @)

        @_syncstring.on 'change', => # only when change is external

            @_syncstring.wait_until_read_only_known (err) =>
                @editor.show_content()
                @editor._set(@_syncstring.get())
                @_fully_loaded = true
                @codemirror.setOption('readOnly', false)
                @codemirror1.setOption('readOnly', false)
                @codemirror.clearHistory()  # ensure that the undo history doesn't start with "empty document"
