improved error checking when including config files