Updating logic for wait for dowload to start and handling error in
downloads