Improve download and extract failure logic