Add some logging and print to know what's happening.