Completing directory creation logic