add show-statistics and clean-statistics option to main function