Thanks, This works great! I did not know that it is possible to iterate through the file lines with a while function that's conditional on additional lines being present or not.