add exit trap