Add messages_ready check.

Do we need this `console.log`... If we do then maybe we should be logging something a little more compact than `res`