Fix client and add logging to udp for troubleshooting