The contestant must also file with the county auditor a bond, with security to be approved by said auditor, conditioned to pay all costs in case the election be confirmed, or the statement be dismissed, or the prosecution fail.