only makes directories when needed