Added debug check to loading.html