remove duplicated code and warn when master IP changes

remove duplicated code and warn when master IP address changes.

only try and preform extra DNS resolves after a error.  This solution is better because often times when using DDNS the ip address will flop between the old and the new address because DNS servers are often  load-balanced and not updated in sync.