The treasurer and all other agents, when required by the trustees, shall, before entering upon the duties of their office, give bonds in such penal sum as the board of trustees may require for the security of any funds coming into their hands and to secure the carrying out of any authority given them.