Added process id logging and heartbeat

Here you go.