improved error handling (and labelling) for socket node... but not perfect by a long way...