Edit downloadPage function.