Modified to suit the new log file format