Move sync_if_needed() to macro