separate terminate method
configuration loading