Code added for Periodic checkpoints and periodic message sending