made onerror handler ONLY handle 404 errors