Execute script at before.