improve -r option, HISTFILE update