Save bash history immediately