Attempted fix to list index out of bound while saving log data.