Thank you for the sample project.

I have a question: When the user clicks the close button (or exits application) during a download, download procedure keeps going on.

I'd like to know how to add the following feature:

When the application is stopped somehow
(by user, by system or other failure)

1. Stop the download process
2. Delete the file that was downloaded partially