If, upon hearing of a petition filed pursuant to section 14-413 it appears to the district court that testimony is necessary for the proper disposition of the matter, the court may take evidence or appoint a referee to take such evidence as the court may direct and report such evidence to the court with findings of fact and conclusions of law, which shall constitute a part of the proceedings upon which the determination of the court shall be made. The court may reverse or affirm, wholly or partly, or may modify the decision brought up for review. Costs shall not be allowed against the zoning board of appeals, unless it shall appear to the court that such board acted with gross negligence or in bad faith or with malice in making the decision appealed from. All issues in any proceeding under sections 14-408 to 14-414 shall have preference over all other civil actions and proceedings.