Add logging function to moduleLoader