[bug973112] - Moved error tracker to a separate file, change 'onerror' to 'eventListener'