I don't like this line :)

it returns false if sync is false
otherwise it returns done()

It's super hard to read...