check if a file exists before adding it to the archive