enhanced exitMode and made public for usage outside of the service