modified to allow past files to be processed when needed