[ajax, js]: Failure compensation and fail-safe for invalid files.