added rudimentary input error checking to 'run-prog'