toArrays callback with filename & arr