record last modified date in mongodb