append file log and optimize status flush logic