Added code for check directory structure