The truck recently developed a check engine light. It's a P0340 camshaft position sensor. The code will appear and then after a few drives it will disappear. I logged about 1000 miles of driving after I put the replacement engine in with no codes. Now any time I rev it over 3000 RPM the code will appear. I replaced the sensor. I inspected the harness. The RPM thing worries me that it's out of time but it runs fine and I verified the timing marks. I'm going to tear it apart again tonight to verify the marks a 3rd time but right now it's not making any sense. I would think if it has skipped a tooth the computer is going to see the timing discrepancy and throw the code at any RPM not just over 3000?