redundant begin block in try-catch removed. order of execution of finally fixed.