output to correct dir