debug.txt: don't write in binary mode