Need help in creating a bug detector.