Refactored the download warning code