disconnect sockets before unload
Logging etc