Improved logging errors to piwik.