Add statistics handler in example program.