improve logging // fix failure on missing certificate