Fix log writer