fixing directory creation precendence