heartbeat begin test keep file heartbeat socket flushed