Add ORC checkpoints

Only flush buffered values if necessary