Added important try-catch.