Keep stepwise optimality accuracy together in folder, with different ending depending on MATLAB vs. R implementation