Added process id logging and heartbeat