Added loging

Added logging