Fix the diary not saving in local disk issue