Added functional logging in connection