check if the file is already processed before adding it to a batch of
file to process
update the file status
fix bug