better error trapping and logging for get_name_info
passing tests