Certainly prevention, as detection is too late and shows that relies on measuring quality instead of implementing quality. Prevention is key and a supporting tool may be detection. Prevention means one is in control of the process, which requires to be the modus operandi.