In case any common carrier subject to the provisions of this chapter shall do, cause, or permit to be done anything herein prohibited or declared to be unlawful, or shall willfully fail to do anything in this chapter required to be done, it shall be liable to the person injured thereby for three times the amount of damages sustained in consequence, together with costs of suit, and a reasonable attorney fee to be fixed by the court, on appeal or otherwise, which shall be taxed and collected as part of the costs in the case; but in all cases demand in writing shall be made of the carrier for the money damages sustained before action is brought for a recovery under this section, and no action shall be brought until the expiration of fifteen days after such demand.