improved detection of failed downloads