fixing pidfile