Add additional logging for debugging #2441.