Added code to download data if needed