Adding better logging support