Created debug.Rnw and function to create files for c++ version of scan-trio