overhaul private dir handling