Added heartbeat messages to check if the server is alive