added error and test for syncing
better error message
Merge pull request #38 from uber/sync.test

added error and test for syncing