             store = @get_store()
             if not store?
                 cb("store no longer defined"); return
-            map = store.get_directory_listings().set(path, if err then err else immutable.fromJS(listing.files))
+            map = store.get_directory_listings().set(path, if err then misc.to_json(err) else immutable.fromJS(listing.files))
             @setTo(directory_listings : map)
             delete @_set_directory_files_lock[_key] # done!
         )

                    until   : (s) => s.get_my_group(@project_id)
                    timeout : 30
                    cb      : (err, x) =>
                        console.log("got ", err, x)
                        group = x; cb(err)
            (cb) =>
                store = @get_store()

        path = @state.current_path
        listing = @get_directory_listings().get(path)
        if typeof(listing) == 'string'
            if listing.indexOf('ECONNREFUSED') != -1
                return {error:'no_instance'}  # the host VM is down
            else if listing.indexOf('o such path') != -1
                return {error:'no_dir'}
            else if listing.indexOf('ot a directory') != -1
                return {error:'not_a_dir'}
            else
                return {error:listing}
        if not listing?
