Adding some logging functionality for debugging purposes