move workingdir to the end of script