dynamic directory lookup and creation