You should not have criticize your son in front of his friends.
Why? He did something wrong.
I know. But at that time your blame is rubbing salt into his wounds.
I only wanted to help him.