catch errors in map generation