title: R sometimes does not save my history
body: <p>I have a program in R.  Sometimes when I save history, they do not write into my history file.  I lost some histories a few times and this really drive me crazy. </p>
  
  <p>Any recommendation on how to avoid this?</p>