This one wasn't as important to move, since we already know the download failed, but I moved it for consistency. It still feels appropriate to close the file before reporting that we are done.