added IP address logging functionality