move dump task into a generator