Error handling and cleanup. More todo on map sign