Defect spectroscopy of nanodiamond thin layers