added optional offset to resume the download from within the file