check curl status code and terminate if different than 200