adding file field into array passed to callback function