finish run recorder function