Two species model for deposition and erosion of carbon - nitrogen films