Send output to the correct directory.