added immediate write to history file of bash commands