Added some try/catch to manage issues.