wal: sync before returning from create

fix #1566