Upon considering the police report and accompanying documents under Section 173, and conducting any necessary examination of the accused, the Magistrate shall provide both the prosecution and the accused an opportunity to be heard. If the Magistrate finds the charge against the accused to be groundless, he shall discharge the accused and record his reasons for doing so.