use JSON configuration with error handling