add stream, read and write file