Update fail logic and add quotes for the certs.