check directory