sync upon more events as well as when a file closes.