Swapping the flush in the logout statement to make the trace contain the logout line.