check if the directory exists in backup()