Both are achieved by opening the socket from main and passing it to the ctlsock package instead of passing the path.