raise errors if download fails