Say goodbye only if running.
Do remove pidfile only if running.