enhancement in main script so that it does not crash when it runs for 0 (only warning) ans trace can be viewed