Adding logging statement for exception