ok, I've changed the reopening of the old log file to be O_WRONLY and O_APPEND