Added finally block for cleanliness