don't crash on missing element
filter out non script tags
more meta info from error message
better reporting on window open