Added code for log data