safer socket.io initialization + more debugging