Analysis of chemical vapour deposited diamond films by X-ray photoelectron spectroscopy