Add debugging output to popup.php