fixed dir not created bug