The defendant or any person who had possession or control of the attached property at the time levy was made thereon under the writ may, at any time during the course of the action, secure the discharge of the property, in whole or in part, from the lien of the attachment and obtain the return thereof to defendant, by filing with the clerk a bond in such amount and form and with such sureties as t