Finalize graphics and log file
tdmGraAndLogFinalize(opts, gdObj = NULL)with opts$GD.DEVICE one out of
[ "pdf" | "png" | "win" | "rstudio" | "non" ],
see tdmGraphicInit
object of class TDMgdev, the return value from tdmGraAndLogInitialize, to ensure that tdmGraAndLogInitialize was called before (and the sink on opts$LOGFILE can be closed)