cleanup, output nonce on write