Fix error handling writing checkpoint

Errors while updating checkpoint were being ignored, resulting in obscure replication failures.
This change improves error handling and adds a test for one case of error updating the checkpoint to confirm that an error is reported back to the replicate complete callback.