OBD-2 fault code p0012 in a 2002 vw new beetle

The car is a 2002 VW beetle 1.8 turbo AWV engine. That has an intermittent fault(s) p0340 and p0012 which is a problem with the cam position sensor (CPS) and the position of the intake cam. The engine has been rebuilt (new TB,CPS, new belt tensioner, new head gasket, new everything… The car has been driven almost 7,000 miles and now these two codes. And now my question…What is the problem? Could it be related to the cam adjustment tensioner?