updates to createDir function