code clean up, cancel download operation