Improve last commit: simulate network error in the middle of sync