Fix bookmarklet and tighten try/catch scope