Update main.pas

Life 8.2
settingsScan procedure small refactoring.