Adding error handling and reports. Moved ReadCfg to public.