updated script to download xml and csv files