cleanup measurement script