Write PID file for supervisor compatibility