Logic to check the value of the current directory added