Method for getting the flag for each country, another one for writing results to a file