diff --git a/common/python/nomadcore/simple_parser.py b/common/python/nomadcore/simple_parser.py
index 4e4ef2f4c4a85f2dba774a500d1b6ece5977c771..92c652089d243e93deff2641dc6bd6147925d03e 100644
--- a/common/python/nomadcore/simple_parser.py
+++ b/common/python/nomadcore/simple_parser.py
@@ -29,6 +29,7 @@ class PushbackLineFile(object):
 
     def __init__(self, fIn, lines=tuple()):
         self.fIn = fIn
+        self.fInLine = None
         self.lines = list(lines)
         self.lineNr = 0
         self.name = fIn.name
@@ -40,10 +41,18 @@ class PushbackLineFile(object):
         else:
             res = self.fIn.readline()
             if res:
+                self.fInLine = res
                 self.lineNr += 1
             return res
 
+    def peekline(self):
+        pos = self.fIn.tell()
+        line = self.fIn.readline()
+        self.fIn.seek(pos)
+        return line
+
     def pushbackLine(self, line):
+        self.fInLine = line
         self.lines.append(line)
         self.lineNr -= 1