Added logging of detected IP address