adding exception handler and separate process relaunching