fix the assignment of datadir in the command to generate the data directory if it doesn't already exist