added statistics to write master