winget day 27: stopping downloads

Current implementation problem: how do I make downloads stop? Not only is a download a separate thread, but it's running wget code, so I don't know what exactly I can do. Should I just kill the thread? That would keep the rest of my downloadFile function from running, so the filehandle wouldn't be closed, among other things. So I think I need to have the wget code pretend there was an error in the innermost loop.