some updates to update_hosts and update_domain utils