Make sure output goes to the correct dir