added exception handler for socket io