Added stats and log information, added socket.emit in map file to generate log