Adding debug and incrementing for publish