If package cannot be downloaded display error and stop

Right now if a package download fails the script doesn't notice, continues and throws unhelpful errors.

With this addition if download is unsuccessful, we reports an error and exit.