send message event instead of console.error