overhauled logging and added command line interface
added check for HTTP code 200