core: added socket close debug