execute scripts upon recording start and recording end