added support for tls and config prefix.