Section 335(3) in The Code of Criminal Procedure, 1973
(3)No order for the delivery of the accused to a relative or friend shall be made under clause (b) of sub-section (1), except upon the application of such relative or friend and on his giving security to the satisfaction of the Magistrate or Court that the person delivered shall -(a)be properly taken care of and prevented from doing injury to himself or to any other person;(b)be produced for the inspection of such officer, and at such times and places, as the State Government may, direct.