adding try-catch-finally snippet