made configuration loading more robust