change check using -e instead of -f