try-catch with secured logger