You should probably first verify that a line match an expected pattern