adds error handling and command line arguments
gets rid of the test xml file