When such action is commenced by attachment or, in aid thereof, an ancillary attachment is sued out, the officer issuing the writ of the plaintiff, in person or by his agent or attorney, producing before him the written evidence of the waiver or making and filing with him an affidavit that the exemption has been waived, must endorse on the writ the fact of such waiver and the extent thereof.