Fix error logging for non-browser environments.
Merge pull request #69 from laszlopandy/error-log-fix

Fix error logging for non-browser environments.