The court or judge granting the writ may previously require bond with security in a reasonable penalty, payable to the person to whom the writ is directed, with condition that the petitioner will not escape by the way, and for the payment of such costs and charges as may be awarded against him. It shall be filed with the other proceedings on the writ and may be sued on for the benefit of any person injured by the breach of its condition.
W. Va. Code § 53-4-3