Only insert code once we know it is good