Bug 988301 - Avoid main-thread IO in Sync code. r=Yoric, r=rnewman