Reasonable main function
Better on-the-run repotring