core: flush outputted logs immediately