Added mongodb operations for heartbeat functionality