(a) No sheriff, jailer or other officer charged with the custody of the prisoner is entitled to any allowance for keeping or removing the prisoner, if the prisoner escapes from the custody of the sheriff or jailer, or from the officer during removal.
(b)
(1) Where prisoners make their escape from jail by means of force, stratagem or other fraudulent device, and reasonable care and diligence were used by the jailer to prevent the escape, or to secure the prisoner or prisoners in jail, the jailer shall be entitled to fees as jailer; provided, that it shall be clearly made to appear to the satisfaction of the judge of the circuit or criminal court in the county where the escape was made or the cause pending, that the escape was effected in the manner and under the circumstances aforementioned, and that the jailer had used the proper efforts on the jailer's part to recover the prisoner or prisoners.
(2) In all cases falling within this subsection (b), it is the duty of the judge to certify the claim for payment as in other bills of cost, and the sheriff or other officers having custody of the prisoner or prisoners shall have all the benefits of this subsection (b).