wal: reorgnize wal file