Log PID properly
Test PID logging
More stable tests
Merge branch 'pid'