change exit pattern and order in postConnet()

define exit pattern before table end pattern