write all files with streams