Made some changes to read master config and read json file functions.
(clearer error messages.)