Referring to the photos of the US military abusing prisoners, someone said: if you don't want to be caught on the spot doing something stupid, you don't do anything stupid
Or get caught on the spot when you do something stupid, or don't do something stupid.