Added function to propagate & write data file for convenience