added failure conditions, added ordering for log data nad xids