Improve error reporting and stack traces.
Test for browser query string instead of browserstack boolean.