added logging to RTD
improved logging