added a file to extract chunks from data
instead of taking the data as input, the function now takes the filename
as input.