Bugfix, logging global errors to log