Adding some logging for debugging issues