tdb: Truncate the file after expand failure