Improve logging in Module.cpp