I made a few changes here

I'd like to change this script such that the host name can be an argument. I'd also like to fix up some of the error checking and reporting of errors.