fix directory creation issue