Hopefully fix truncated logs on exit.