Improve script to spot logs repeating every three lines.