PATCH v2 removed the variable lastCheckPointEndPtr and refined the comments.
Thanks for reviewing.
-- Adam