Added exception system for handling problems with writing to UDP socket