Text this: On one optimal way of control over thermal treatment process