Add handling for creating the directory