new feature: check directory existence