import of little script I had been using
soem usage
added command line processing and logging