Fixed an error which wrote an extra buffer into the last recovered file.