add stat handlers to serial io