moved useTlsThenClose to TLS module, renamed to useTls