Added debug message to onMessage