Another way to validate directory creation