Now gets the message data before echoing anything to avoid log messages being intermingled