Add ability to specify server and add better debug messages.