Controlled the setting a reference as an undefined or null module and added the log util method.