simplified signature for writeRecord()