Create the base directory before write check