Updated with file close