No discharge shall be granted pursuant to RSA 618:10 unless the petition shall be approved by the county attorney, or it shall appear to the court that the county attorney has been served with a copy of the petition, and that notice has been given to him of the time and place when and where the petition is to be presented to the court at least 10 days before the hearing upon the petition, and the petition, evidence and order of the court shall be filed in the office of the clerk of court.