Fixed detection of line modification. Improved debugging.