write map to map.txt