delivered the opinion of the court:
The State appeals from the dismissal of charges against codefend-ants Lyndell Heinzmann and Terry Potter by the circuit court of Fay-ette County as sanction for the failure to disclose in discovery a written statement of one of the State’s witnesses (see 134 Ill. 2d R. 415). We affirm.
At the request of the sheriff’s department of Fayette County, an investigation began into the sale of stolen pigs at a local auction market. The pigs, believed to belong to Ken Shoemaker, were sold under the name of Rodney Hassebrock. Hassebrock revealed he sold the pigs for defendant Heinzmann, who supposedly had gotten the pigs in trade from Dale Nelson. Nelson, a pig farmer and employee on Shoemaker’s farm, admitted stealing the pigs but implicated codefendants Heinzmann and Potter as accomplices. The State chose to pursue prosecution of Heinzmann and Potter and charged them both with theft over $300. No charges were filed against Nelson.
During the course of the first trial of Heinzmann and Potter, defendants discovered they had only been given one of four settlement sheets pertaining to the sales of allegedly stolen pigs at the livestock auction. The remaining three sheets had been placed inadvertently in the file of the State’s Attorney. The trial court declared a mistrial, while strongly suggesting defense counsel and the State’s Attorney examine the State’s file together to ensure all other discoverable materials had been provided.
Defendants’ second trial commenced with the examination and cross-examination of Dale Nelson. During Nelson’s testimony, defendants learned Nelson had previously made a written statement to the police. This written statement, which had been placed in an evidence file by the investigating Department of Criminal Investigation (DCI) agent, also had not been disclosed in discovery. The State requested a continuance to remedy the problem; the trial court chose instead to dismiss the charges.
The State argues on appeal the trial court erred in dismissing all charges against both defendants, especially when the discovery violation was not intentional. The State candidly admits the failure to disclose Nelson’s written statement constituted a violation of the discovery rules but argues not every violation requires the dismissal of charges. As sanctions for discovery violations should be fashioned to compel compliance not punish simple oversights (see People v. Forsythe (1980), 84 Ill. App. 3d 643, 646, 406 N.E.2d 58, 61), the State believes a continuance would have been a more appropriate sanction in this instance. The State points out Nelson was still present in court and easily could be recalled. Moreover, there would have been little disruption of the trial as Nelson was the only witness who had been called at the time the dismissal was entered. The State further contends Nelson’s statement, serving primarily as impeachment, was not sufficiently material to the trial and therefore concludes it should have been given the opportunity to complete its case against defendants when, by so doing, defendants would not have been unduly prejudiced or denied a fair trial.
Before turning to the merits of the State's contentions on appeal, we first must address defendants’ argument that the State’s appeal should be dismissed on the grounds the State failed to establish jurisdiction in this court under Supreme Court Rule 604(a) (134 Ill. 2d R. 604(a)). Rule 604(a) provides:
"(1) When State May Appeal. In criminal cases the State may appeal only from an order or judgment the substantive effect of which results in dismissing a charge for any of the grounds enumerated in section 114 — 1 of the Code of Criminal Procedure of 1963; arresting judgment because of a defective indictment, information or complaint; quashing an arrest or search warrant; or suppressing evidence.” (134 Ill. 2d R. 604(a)(1).)
Section 114 — 1 of the Code of Criminal Procedure of 1963 (Ill. Rev. Stat. 1989, ch. 38, par. 114 — 1) in turn sets forth various grounds upon which a trial court may base a dismissal of an indictment, information or complaint. While dismissal based upon a discovery violation is not specifically mentioned in either Rule 604(a) or section 114 — 1, our supreme court has determined that when Rule 604(a) made explicit the right of the State to appeal on grounds set forth in section 114 — 1, it was not intended to reduce the range of the State’s right to appeal but rather was intended to make clear the State had a right to appeal from dismissals on any of the various grounds set forth in section 114 — 1. (See People v. Lawson (1977), 67 Ill. 2d 449, 455-56, 367 N.E.2d 1244, 1246-47; People v. Love (1968), 39 Ill. 2d 436, 439-40, 235 N.E.2d 819, 821-22; People v. Carpenter (1991), 221 Ill. App. 3d 58, 66, 581 N.E.2d 683, 688.) Additionally, the grounds for dismissing an indictment, information or complaint under section 114 — 1 are not exclusive. (Lawson, 67 Ill. 2d at 456, 367 N.E.2d at 1247.) As stated in Love, “The redrafting [of Rule 604(a)] was not intended to extinguish the People’s right to appeal from judgments the substantive ef-feet of which was to dismiss indictments on grounds not specified in the rule ***.” (Love, 39 Ill. 2d at 440, 235 N.E.2d at 822.) We therefore conclude we have jurisdiction to hear this appeal and accordingly proceed to the consideration of the propriety of the dismissals of charges against both defendants.
Supreme Court Rule 415 (134 Ill. 2d R. 415) provides a variety of sanctions which may be imposed for failure to comply with discovery. (People v. Manzo (1989), 183 Ill. App. 3d 552, 557, 539 N.E.2d 237, 240; People v. Leannah (1979), 72 Ill. App. 3d 504, 508, 391 N.E.2d 187, 190.) For instance, the court may order disclosure of the material, exclude the evidence, grant a continuance or “enter such other order as it deems just under the circumstances,” including dismissal. (134 Ill. 2d R. 415(g)(i); see also Forsythe, 84 Ill. App. 3d at 645, 406 N.E.2d at 60; Leannah, 72 Ill. App. 3d at 508, 391 N.E.2d at 190.) In fashioning an appropriate sanction, the trial court must evaluate the strength of the undisclosed evidence, the likelihood that prior notice could have helped the defense discredit the evidence and the willfulness of the State in failing to disclose. (Manzo, 183 Ill. App. 3d at 557-58, 539 N.E.2d at 241.) While the preferred sanction for a discovery violation, generally speaking, is a recess or continuance if the granting thereof would be effective to protect the other party from surprise or prejudice (see People v. Pondexter (1991), 214 Ill. App. 3d 79, 85, 573 N.E.2d 339, 343; People v. Carrasquillo (1988), 174 Ill. App. 3d 1023, 1032, 529 N.E.2d 603, 609), dismissal may also be appropriate especially when necessary to compel compliance and/or to ensure a fair trial (see People v. Pearson (1991), 210 Ill. App. 3d 1079, 1085, 569 N.E.2d 1334, 1338; Leannah, 72 Ill. App. 3d at 506, 391 N.E.2d at 189). In any event, the sanction to be applied rests within the trial court’s discretion and, unless there has been an abuse of that discretion, will not be disturbed on appeal. (Pondexter, 214 Ill. App. 3d at 85, 573 N.E.2d at 343; Manzo, 183 Ill. App. 3d at 558, 539 N.E.2d at 241; People v. Flores (1988), 168 Ill. App. 3d 284, 293, 522 N.E.2d 708, 714.) We find no such abuse in this instance.
It is true the State’s failure to turn over the written statement of Nelson to defendants was inadvertent. Contrary to the State’s assertion, however, under the circumstances as they existed here, such failure was prejudicial to both defendants linked together in the same crime. Nelson was a key witness for the State. Not only was he directly involved in the alleged theft of the pigs with defendants Heinzmann and Potter, he also was not charged for his participation in the crimes. As such, any testimony given by Nelson was inherently suspect. (See People v. Wilson (1977), 66 Ill. 2d 346, 349, 362 N.E.2d 291, 292; Illinois Pattern Jury Instructions, Criminal, No. 3.17 (2d ed. 1981).) Moreover, Nelson’s written statement to the police contained several inconsistencies and specifically included the name of another individual involved in the whole series of transactions who in all likelihood would have been called as an additional witness. Allowing recall of Nelson for further examination would not allow the defense the opportunity to interview this potential witness, and granting a continuance would only serve to highlight in the minds of the jurors Nelson’s incriminating testimony, the only testimony heard at that point, during any delay in trial. Obviously, exclusion of the statement or the witness would have been useless as Nelson had already testified. Additionally, the statement was more helpful to defendants than to the State. More important, however, is the fact that this was defendants’ second trial. The first trial resulted in a mistrial because of the State’s failure to disclose material evidence. At that point, the court specifically encouraged the State’s Attorney to meet with defense counsel and review the files to make sure all discoverable material had been provided. While Nelson’s statement was not present in the files of the State’s Attorney, the agent who had the statement sat at the State’s table during the trial and specifically pointed it out to the State’s Attorney once its existence was mentioned. (See People v. Miles (1980), 82 Ill. App. 3d 922, 928, 403 N.E.2d 587, 592 (duty of State to see proper flow of information between various branches and personnel of its law enforcement agencies and legal officers).) Clearly defendants were prejudiced in this instance, and other possible sanctions simply were not appropriate or no longer feasible. (See Pearson, 210 Ill. App. 3d at 1085, 569 N.E.2d at 1338; cf. Manzo, 183 Ill. App. 3d at 558, 539 N.E.2d at 241; Forsythe, 84 Ill. App. 3d at 645-46, 406 N.E.2d at 61; Leannah, 72 Ill. App. 3d at 507-08, 391 N.E.2d at 190.) Contrary to the State’s assertions, the court was protecting defendants’ rights to due process, not punishing the State. As the trial court itself so aptly mentioned in ordering dismissal of all charges, fairness requires a limit to the number of times defendants must be forced to stand trial.
For these reasons, we affirm the judgment of the circuit court of Fayette County dismissing all charges against defendants Heinzmann and Potter.
Affirmed.
HARRISON and W. LEWIS, JJ., concur.