                             socket.on 'mesg', (type, mesg) =>
                                 if type == 'json'
                                     if mesg.event == 'project_state_update'
-                                        winston.debug("state_update #{misc.to_json(mesg)}")
+                                        winston.debug("state_update #{misc.to_safe_str(mesg)}")
                                         p = @_project_cache[mesg.project_id]
                                         if p? and p.host == opts.host  # ignore updates from wrong host
                                             p._state      = mesg.state

        if opts.args?
            args = args.concat(opts.args)
        args.push(@project_id)
        dbg("args=#{misc.to_json(args)}")
        smc_compute
            args    : args
            timeout : opts.timeout

                                            if STATES[mesg.state].stable
                                                p.emit('stable', mesg.state)
                                    else
                                        winston.debug("mesg (hub <- #{opts.host}): #{misc.to_safe_str(mesg)}")
                            cb()
        ], (err) =>
            opts.cb(err, @_socket_cache[opts.host])
