Adding ability to calculate the error rate periodically