Fix log appending