If not filed earlier, any affidavit in support of a search warrant shall be filed with the court when the warrant and inventory are returned. Upon filing the warrant and supporting documents, the law enforcement officer may apply by separate affidavit to the court to seal the supporting affidavit from public inspection or disclosure. The court, for reasonable cause shown, may order the contents of the affidavit sealed from public inspection or disclosure but may not prohibit disclosure that a supporting affidavit was filed, the contents of the warrant, the return of the warrant, nor the inventory. The court may order that the supporting affidavit be sealed until the investigation is terminated or an indictment or information is filed. In cases of alleged rape, incest, or sexual contact, if the victim is a minor, the court may limit access to an affidavit pursuant to §. However, a court order sealing a supporting affidavit may not affect the right of any defendant to discover the contents of the affidavit under chapter 23A-13.