Modify BgRecorder to send message to Message.js.