Update main.pas

Life 7.1
[Refactoring] LifeCheck procedure rewrited.