add msg.id option and more logging