corrected file close and duplicate assembles