Fix PIDFILE issue