forgot to close write streams