Implemented error handling in events update thread, fixes #49