More error checking, fixed udp scrape, implemented tcp scrape