added console log for subscribe and publish messages