Make pidOrName arg non-optional. Ensure all errors stopping/restarting are logged, first error is thrown when all restarts/stops complete