If any person so committed, shall bring a writ of habeas corpus, he shall not be discharged by reason of any insufficiency in the form of the warrant of commitment; but the court before whom such person shall be brought, shall re-commit such person, unless it shall be made to appear that he has answered all lawful questions put to him, or had sufficient reason for refusing to sign the examination, as the case may be; or unless such person shall then answer, on oath, the questions so put to him.
N.Y. Debt. and Cred. Law § 173