add pid logging