mode x must create if file does not exist
Fixing failing StreamWrapper test