Added Logging Functionality