No appeal by a taxpayer or officer may be allowed unless, within the time of taking the appeal, the appellant secures a bond in the sum of $1,000 with sufficient surety to prosecute the appeal and to pay all costs of appeal, in case, if the appellant is a taxpayer, the appellant fails to obtain a final decision more favorable to the borough than that awarded by the auditors or, in case, if the appellant is an accounting officer, the appellant fails to obtain a final decision more favorable to the officer than that awarded by the auditors. Unless the bond is filed as provided in this section, the court of common pleas, upon application, shall set aside the appeal.