Reducing the size of history files