Added a function to save the map on node exit