The security required for the issuance of a writ of attachment shall be for the amount of the plaintiff's demand, exclusive of interest and costs. If the writ is obtained on the sole ground that the defendant is a nonresident, the security shall not exceed two hundred fifty dollars, but on proper showing the court may increase the security to any amount not exceeding the amount of the demand.