Added the data logging