updated the udp listener to also write to file