add TorrentFiles class; use binary search for looking up file by position;
check some numeric values to be in a valid range.