add exit handler rts dep