added missing errorset
chdir
run is now more correct