Adding error handling for missing config or content