filewriter bug fix
write diff folder only when diffs are generated