Safer publish script