improved record handling for WriteService