Correctly handle incomplete downloads