use config file and work on clean exit