Fix pid file not removed after stop