fine tuning publish cmd
added try/catch round the publish cmd