Such judge when fulfilling the duties imposed upon him or her by said acts of congress, and by this chapter, must keep a correct account of all moneys received and paid out by him or her. He or she must deposit all surplus money with the treasurer of the proper county, and he or she must promptly settle up all the affairs relating to his or her trust pertaining to such town.