Will add a comment. This method returns the last timestamp written on disk. A naive implementation is to read the last log file and return the timestamp of the last entry. But if that file is empty you are screwed up. So I iterate the files in reverse order until a file with a timestamp is found. I use a var because of the cost of reading the whole file to find the last timestamp of the file.