Update the create .dat

Two different methods to create the .dat file. One runs in the initialization, the other just updates the .dat