updated .gitignore
now writing the correct length files to the harddisk
changed writable stream to modify existing files (flag r+)