Added error handling when connecting to a DNS address (Wrongly typed IP is treated as a DNS)