do a final commit to ensure all records are written