Fix try-catch block syntax error