Added function to parse the map file