changing order of execution and actually changing into correct dir