Move stack code to Zotero.Debug.log