Prevent ill-formed configuration files from causing trouble

Also supports partial-config processing. Thanks to PIP