curl should also fail on unsuccessful downloads