The structure of conducting and non-conducting homoepitaxial diamond films