add log print in inserted code