Fix truncated file