Investigation of gas phase mechanisms during deposition of diamond films