Several changes

* Avoid warning messages when unable to determine IP.

* Fix referring to protected members of class Exception.
Return an exit code
Remove comment block
Check for existing internet connection before continuing
Use single quotes