Use readBool func

Introduced a new readBool function to parse string values to bool
values.
The function is more general and makes the behavior consistent.
Test warning codes + fmt

Test wwarning codes instead of the full message.