Do not download twice if the file already exists and have the same size as the content-length of the http response
Fix tests