adding config file safety check