Added debug functions and began validation of command line arguments