Make it possible to obtain the pidfile from outside

For logging purposes, for example.