check for existence of files for idempotency