Using safely for finally block