diff --git a/DEVELOPER_NOTES b/DEVELOPER_NOTES
index 746bc65e803d513ab0f152a1d098263d856adbd9..a7d9e679e01616544aae23055fe352a4a38a6b76 100644
--- a/DEVELOPER_NOTES
+++ b/DEVELOPER_NOTES
@@ -1,2 +1,4 @@
 the top of the pushdown store:
   the top of the pushdown store is on the left meaning that transition function (r, xyz) \in (q, 0, abc) will pop symbol a first than symbol b and then symbol c, push symbol z then symbol y and finally symbol x. The typical representation is a vector of symbols so for the pop part forward iterators begin and end should be used and for the push part reversed iterators rbegin and rend should be used. This is very much similar to grammars where context free grammars generating a string or a sentential from a rules say A -> aBb| c product a^ncb^n. First b is pushed then B and finally a.
+
+String parsers cannot process correctly text files with more than 4096 characters on a single line at least on some systems. There is a bug in unget and putback function on istream.
diff --git a/examples2/rte/gen_rte1.py b/examples2/rte/gen_rte1.py
index 673b31fa830105def8d08190dc0bbd0bb73095bd..fb17d1948d727edd2336a2228bfa470980ecff18 100755
--- a/examples2/rte/gen_rte1.py
+++ b/examples2/rte/gen_rte1.py
@@ -3,10 +3,17 @@ import random
 import sys
 
 MAXD = 200
+MAXL = 1000
+L = 0
 
 def p(c):
     print(c, end='')
+    global L
+    L = L + 1
 
+    if L > MAXL:
+        L = 0
+        print ("\n", end='')
 
 def SCont(depth):
     if depth > MAXD or random.randint(0,1) == 0:
diff --git a/examples2/rte/gen_rte2.py b/examples2/rte/gen_rte2.py
index 87e0169d4182a73503efbf298df655c91f7f70be..73e9bd886d8f21bfde728af12528692b0c429f95 100755
--- a/examples2/rte/gen_rte2.py
+++ b/examples2/rte/gen_rte2.py
@@ -3,9 +3,17 @@ import random
 import sys
 
 MAXD = 200
+MAXL = 1000
+L = 0
 
 def p(c):
     print(c, end='')
+    global L
+    L = L + 1
+
+    if L > MAXL:
+        L = 0
+        print ("\n", end='')
 
 
 if __name__ == '__main__':
diff --git a/examples2/rte/gen_rte3.py b/examples2/rte/gen_rte3.py
index aed186b972feb5576b11f55c884b3867989aaf9e..1a02c48f4a3504fb669fbe283be93d021ce98177 100755
--- a/examples2/rte/gen_rte3.py
+++ b/examples2/rte/gen_rte3.py
@@ -3,9 +3,17 @@ import random
 import sys
 
 MAXD = 200
+MAXL = 1000
+L = 0
 
 def p(c):
     print(c, end='')
+    global L
+    L = L + 1
+
+    if L > MAXL:
+        L = 0
+        print ("\n", end='')
 
 
 def S(depth):
diff --git a/examples2/rte/gen_rte4.py b/examples2/rte/gen_rte4.py
index 6f7ad63425d6418908548c54bfe658a19aacd130..aa59556f518bd81d8659ac25afe4f43a745edf43 100755
--- a/examples2/rte/gen_rte4.py
+++ b/examples2/rte/gen_rte4.py
@@ -3,9 +3,17 @@ import random
 import sys
 
 MAXD = 200
+MAXL = 1000
+L = 0
 
 def p(c):
     print(c, end='')
+    global L
+    L = L + 1
+
+    if L > MAXL:
+        L = 0
+        print ("\n", end='')
 
 
 def S(depth):
diff --git a/examples2/rte/gen_rte5.py b/examples2/rte/gen_rte5.py
index 4bac9162134d8ef003bb7dac6e5879d7284bb38e..0605fff3eb484ac5e1e92301e6d87635dd2eb4fb 100755
--- a/examples2/rte/gen_rte5.py
+++ b/examples2/rte/gen_rte5.py
@@ -3,9 +3,17 @@ import random
 import sys
 
 MAXD = 200
+MAXL = 1000
+L = 0
 
 def p(c):
     print(c, end='')
+    global L
+    L = L + 1
+
+    if L > MAXL:
+        L = 0
+        print ("\n", end='')
 
 
 if __name__ == '__main__':
diff --git a/examples2/rte/gen_rte6.py b/examples2/rte/gen_rte6.py
index c85aa5fde9477835dd9903c43e84f7d84c9957c1..59602d8c1dda4c4c598cee2034642a77bace1841 100755
--- a/examples2/rte/gen_rte6.py
+++ b/examples2/rte/gen_rte6.py
@@ -3,9 +3,17 @@ import random
 import sys
 
 MAXD = 200
+MAXL = 1000
+L = 0
 
 def p(c):
     print(c, end='')
+    global L
+    L = L + 1
+
+    if L > MAXL:
+        L = 0
+        print ("\n", end='')
 
 
 def SL(depth):
diff --git a/examples2/rte/gen_rte7.py b/examples2/rte/gen_rte7.py
index a7d965cdc6299945ec6d63f5aac890d1991e341c..1830cf6bf460630ab1221c27b819614dbc663593 100755
--- a/examples2/rte/gen_rte7.py
+++ b/examples2/rte/gen_rte7.py
@@ -3,9 +3,17 @@ import random
 import sys
 
 MAXD = 200
+MAXL = 1000
+L = 0
 
 def p(c):
     print(c, end='')
+    global L
+    L = L + 1
+
+    if L > MAXL:
+        L = 0
+        print ("\n", end='')
 
 
 def SCont(depth):
diff --git a/examples2/rte/gen_rte8.py b/examples2/rte/gen_rte8.py
index c2e313e8c8b62582a103303a0c8911fa46cc7d96..86571356a6f2e0b8ceac4c1f929f9d98d321b3d6 100755
--- a/examples2/rte/gen_rte8.py
+++ b/examples2/rte/gen_rte8.py
@@ -3,9 +3,17 @@ import random
 import sys
 
 MAXD = 200
+MAXL = 1000
+L = 0
 
 def p(c):
     print(c, end='')
+    global L
+    L = L + 1
+
+    if L > MAXL:
+        L = 0
+        print ("\n", end='')
 
 
 def S(depth):
diff --git a/examples2/rte/gen_rte9.py b/examples2/rte/gen_rte9.py
index e1e2f209b325f2470afd6dcf21aa9e870a4faa36..164d37d39e23640daa8a889ab7c1d1f5f7347344 100755
--- a/examples2/rte/gen_rte9.py
+++ b/examples2/rte/gen_rte9.py
@@ -3,9 +3,17 @@ import random
 import sys
 
 MAXD = 200
+MAXL = 1000
+L = 0
 
 def p(c):
     print(c, end='')
+    global L
+    L = L + 1
+
+    if L > MAXL:
+        L = 0
+        print ("\n", end='')
 
 
 def S(depth):
diff --git a/tests.glushkovrte.sh b/tests.glushkovrte.sh
index 325ecb35f7f5c430d5bf5b47656c07fa1069c1ef..33bfcc347338a3d35fe0733f1251fec5ffd032ac 100755
--- a/tests.glushkovrte.sh
+++ b/tests.glushkovrte.sh
@@ -47,6 +47,8 @@ function log {
 	cat $2 >> $LOGFILE
 	echo "rte: " >> $LOGFILE
 	cat $3 >> $LOGFILE
+	echo "out: " >> $LOGFILE
+	echo $4 >> $LOGFILE
 }
 
 # $1 = genfile
@@ -64,7 +66,7 @@ function runAcceptTest {
 	fi
 
 	if [ $RET != 0 ]; then # fail
-		log "$PATTERN" "$2" "$3"
+		log "$PATTERN" "$2" "$3" "$OUT"
 		echo -n ""
 	fi