stop download thread when app is closed