Fixes

does the logging setup in the script instead of the library, wraps everything in a nice big try...except, fixes some nameerrors that I hit, and a couple of other bugs.

tested by running on our haproxy config