update directory on each page