Every master or commander of a ship or vessel outward bound shall remain 6 hours after arrival at the Capes to give to the pilot on board such ship or vessel an opportunity to be taken out. If the master or commander of such ship or vessel refuses to do so, and if the same can be done without endangering the vessel, the master, owner or consignee of such ship or vessel shall forfeit and pay to such pilot, the pilot's executors or administrators any sum not exceeding the applicable pilotage rate, to be recovered in any court of record in which the same may be sued for by a civil action or otherwise.