[FIX] When using "--stop-after-init", set the return code correctly. A non zero return code reflect the number of databases that fail to load/update

Backport of 2c4e370b766db6280d38a4d3535e07de604b1922 and
33ce0e73dba7c23d004a278f61943be8052e7f37
[IMP] config: Test that the config file is readable

Fixes #3237

cherry-pick of 8e72049
[MERGE] forward port of branch 7.0 up to d2fd05e