config: improve decoding of booleans, and error messages