added optional parameter to Connect to specify a logger other that StdErr