Relief of the internal stress in ternary boron carbonitride thin films