I placed it at the other cfg.set options to make it clear, but I'll put it in try/except block.

Is probably simpler, you're right.