fix logging for userscript. fixes #252