Add logs on a failed remote connection or hostname resolution.
Force IPv4 family, if IPv6 is not forced.