When a magistrate has discharged a defendant, or has held him to answer, he must return, without delay, to the Clerk of the Court at which the defendant is required to appear, the warrant, if any, the depositions, and all undertakings of bail, or for the appearance of witnesses taken by him.