Help needed , read string.

I work on script which will check object list and found "filed" word then get number of this object.
txt file look like this(there will be nothing else except this.)

"start"
1
"Torus001"
"success"
2
"Box001"
"success"
3
"Torus002"
"success"
4
"Teapot001"
"success"
5
"Teapot003"
"success"
6
"Plane001"
"success"
7
"Plane002"
"success"
8
"Pyramid001"
"success"
9
"Pyramid002"
"success"
10

etc.. etc..

So in some cases instead "success" can be "failed"
So script should check if there is "filed" word and jump to last "failed" word, then jump 2 lines above and get number of this object as value. What is important code should look for last word "failed". On the end script should take all names with "fialed" markers and put it to array list.

So my code is:

s=openFile "c:\\lmaxrecovery-log.txt"
for s=0 to 3 do -- <-- HERE I DON'T KNOW HOW TO SAY READ ALL LINES
(
skipToNextLine s
rdo=skipToString s "failed"
rdo=rdo as string
if rdo==undefined as string then
(
-- <---- HERE I NEED ACTION: GO TWO LINES ABOVE AND TAKE THIS LINE AS VALUE
print "start action"
)
else
(
print "stop action"
-- <----- HERE I NEED SOMTHING LIKE THIS: GET ALL NAMES OF "FILED" OBJECTS AND
-- PUT THOSE OBJECTS TO LIST ARRAY
)
)

I'm beginner in maxscript so I would preffer to make this code as simple as possible basing on my own to handle with rest of my code. Please Help how to do it, go 2 lines above, turn line into value.