added publish response logic, modified logging, other stuff