Added changes for better logging