The investigator tried to catch me out, but I stuck to my story.
The teacher caught out the student and punished him immediately.