add auto mkdir support