Add statistics reporting to the main program (untested).