Flush logs before relaunching