added global checksum to write function, still to do: checksum for every correlator, fix second record of first message