set correct options oreder for mkdir call