fixed to ensure that cacert is optional and added comments on usage