Fix error in generation of ctl.conf

Ticket: #5240