added sync in parallel close write