Effect of oxygen on the nucleation and growth of diamond thin films