catch http error when downloading