If any magistrate fails to hold a preliminary examination or have it waived by setting a date for such preliminary examination and to return such papers and report thereon to the clerk, as directed in this Code, he shall be subject to the payment of a fine of five dollars for every such default, within the discretion of the court to which a rule thereof shall be made returnable.