maintain correct directory structure