Break out logic to hook plugins' main function for reuse in plugin module
Print module names for debugging