The affidavit required by the first section of this article may be amended at any time before or after the appearance of the defendant by the substitution of a new affidavit, complying with the requirements of the statute and containing allegations of facts existing at the time of making the former affidavit; and the new affidavit shall stand in lieu of the old one for all purposes.