Fix create dir issue