Add stat collection library