Detect last line.