Added top-level exception catch.