The right of the owner or keeper to foreclose, as well as the amount claimed to be due, may be contested by anyone interested in so doing, and the proceeding may be transferred to the district court, for which purpose an injunction may issue, if necessary.