Odd that your history is being cleared out, it's never happened to me.
I always keep my own history of every command I ever run. I've moved this from computer to computer. So I can look back years in the past and see what I've done.
case "$TERM" in
xterm*|rxvt*)
PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD/$HOME/~}\007"; echo `date +"%b %e %Y %H:%M:%S"` $? \"`history 1|cut -c7-`\" in `pwd` >> ~/.audit'
;;
*)
;;
esac