This will require sending the line number along with the output as messages are not guaranteed to arrive in order.