update script with rudimentary debug level implementation