Fix startup error related to pidfile