Fix CLI remote address.

Also added --debug parameter to cli