Refactor for better detection of an existing DownloadManager.