Clear stats just before writing stats

Signed-off-by: Jon Ringle <jringle@gridpoint.com>