Adding error dialogs to the publish and run button