pass file reference to data to callback