more robust IP address parsing/logging;