directory creation improved