streamline lazy mode writer; close streams; formatting