partially working comparison doesn't write a file