CreateFile mark as directory, if needed