Make sure diff output is cleared on error