Only update the data file path if the directory exists.