Any register of deeds or county clerk knowingly or willfully failing to perform the duty as prescribed in above section shall forfeit his or her office, and upon petition of the county attorney or the attorney general shall upon summary proceedings be removed therefrom.