The amount of security to be required of a witness is to be regulated by his pecuniary condition, character and the nature of the offense with respect to which he is a witness.