Any party under bond who shall fail to appear at the time and place named in the bond shall be liable to arrest and imprisonment, and the court may declare the bond forfeited, giving written notice to the securities thereon that unless they produce their principal within one (1) week, judgment will be entered up against them for the amount of such bond, and judgment issued against the principal and his securities for the amount of the judgment and costs. Nothing in this section shall be construed to prevent the arrest without warrant or summons of any person when it is necessary to preserve the peace, good order, or security of the city, or to prevent the commission of a crime.