read source file in chunks