output now gets stored in 'out' directory and now both .dta and .cvs file are acceptable inputs