Debugging R code using R, RStudio and wrapper functions