Update main.pas

Life 4.2
Problem with text file reading fixed.