added --simulate option and output sum of written bytes