Adding logging statments