Added data logging