make it so that if there is an error while running 'rebuild', no pages actually get replaced.