fix #284. WAL should recover from files ending prematurely