While a defendant is in custody, the plaintiff, without having a judgment or decree against the defendant, may file interrogatories to him in like manner as might be done under sections one, two and three, article five, chapter thirty-eight of this code, if such judgment or decree had been obtained and a fieri facias thereon had been delivered to an officer. And the court wherein the case is pending, or a judge or a commissioner thereof, after reasonable notice to the plaintiff, or his attorney may discharge the defendant from custody, unless interrogatories be filed within such time as such court, judge or commissioner may deem reasonable; or, though interrogatories be filed, may discharge him when proper answers thereto are filed and proper conveyance and delivery made.
W. Va. Code § 53-7-7