Fix logging at the end of execute loop