Updated script to output the ip address