Use Sync version for filewrite to avoid os x issues