Fixed where an echo was getting in the way of returning error from curl.