Added logging functionality
bf