set directory name based on mode