clean up
changing streaming writes to chunks