No O_TRUNC when opening a history index file

The write operation to the index file may fail due to lack of disk
space, without such option, the original content may be preserved.