run sync at end

Signed-off-by: Jonas Kalderstam <jonas@kalderstam.se>