Added code for basic data logging, may want to add more code for automatic generation later