Add missing raise_for_status() in download()