Added a function to page.js to log debug message