#46 Added logging