Actions brought to recover any of the penalties provided for in this chapter shall be instituted in the name of the state by the county attorney of the county, under the direction and authority of the commissioner of insurance, and may be brought in the district court of any county in which the company or association proceeded against is engaged in the transaction of business, or in which the offending person resides, if it is against the person. The penalties, when recovered, shall be paid to the treasurer of state for deposit in the general fund of the state.