This whole second code branch could be avoided by using the above code block. The fetch of the md5sum file hopefully won't ever trigger a partial redownload, but the API is the same and this name poor anyway as it's not md5 specific at all.