fixing exit condition logging