Add error checking for etcd