Removed superfluous flush and corrected log dispatching