udp_setup() returns with error instead of exiting
increment packet number outside of print function
better error messages and handling