The prosecutor should not have brought charges. I looks to me the defense has a case for malicious prosecution and damages.