How to get latest message in custom TrackerStore

def save(self, tracker):
    if self.event_broker:
    message = tracker.latest_message.text
    logger.debug("store: {}".format(message))

I am trying to store recent message to a file using TrackerStore, I wrote the above code for that. But it is not working. message variable is getting None everytime

Thank you