Add output file write.