Adding separate processing functions for from file and from list