added fprintf's to parse_ipaddr