checkpoint commit. added functions for computing relative error