Added try/catch to config