Revert "Revert "Improve require expansion logging""

This reverts commit 39b32f302a254b49ae64db9fb7a4baa590764ba7.