When a sheriff goes out of office he or she shall deliver to his or her successor all books and papers pertaining to the office, all property attached or levied upon, and all prisoners in jail and shall take a receipt specifying the same. The receipt shall be sufficient indemnity to the person taking it.