If the node initialisation fails, make sure the node environment is clos

...ed correctly (and thus all locks being properly released)