*: lock the in using files; do not purge locked the wal files

why this?

and we should add pkg/fileutil into test file.