[server] close file even if file empty