If any officer under this act shall neglect or fail to perform the duties herein imposed upon them, then they, or either of them, shall, upon conviction, be sentenced to pay a fine of five hundred dollars, and undergo an imprisonment, by separate or solitary confinement, not exceeding three years, respectively, for every such offense.
25 P.S.§ 2096