Made debug output overwrite `debug.txt` instead of appending.