update directory hierarchy