download_manager refactory