clean up monitor on exit