Refactored download: fixed shell injection vulnerability (lines 21-25)