change before_restart file