Download files in a background thread