If any person, after being served with such summons, fail to attend to give evidence or to produce such writing or document according to the summons, the court whose clerk issued the summons, or if it was not issued by the clerk of a court, the circuit court of the county in which the attendance is desired, or a judge of such court in vacation, on a special report by the person or persons before whom there was a failure to attend, on proof that there was paid to him (if it was required) a reasonable time before he was required to attend, the allowance for one day's attendance, and his mileage and tolls, shall, after service of a notice to, or rule upon him to show cause against it (if no sufficient cause be shown against it) fine him not exceeding $20, to the use of the party for whom he was summoned, and may proceed by attachment to compel him to attend and give his evidence or produce such writing or document at such time and place as such court or judge may deem fit. The witness shall, moreover, be liable to any party injured for damages.