Every officer within this state authorized to take the acknowledgment or proof of any conveyance, and every county clerk, who shall be guilty of knowingly stating an untruth, or guilty of any malfeasance or fraudulent practice in the execution of the duties prescribed for them by law, in relation to the taking or the certifying of the proof or acknowledgment, or the recording or certifying of any record of any such conveyance, mortgage or instrument in writing, or in relation to the canceling of any mortgage, shall upon conviction be adjudged guilty of a misdemeanor, and be subject to punishment by fine not exceeding five hundred dollars, and imprisonment not exceeding one year, and shall also be liable in damages to the party injured.