Using macro for checkpoint