Added Logging functionality