Refine writing record implementation in TemFuDb