added onerror to asset loading