add quit() and post,pre scripts