cat: defer file close